-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintcache
1 lines (1 loc) · 104 KB
/
.eslintcache
1
[{"D:\\Code\\ReactJs\\rough\\src\\index.js":"1","D:\\Code\\ReactJs\\rough\\src\\App.js":"2","D:\\Code\\ReactJs\\rough\\src\\reportWebVitals.js":"3","D:\\Code\\ReactJs\\rough\\src\\components\\infLoops\\InfLoops.js":"4","D:\\Code\\ReactJs\\rough\\src\\components\\ludo\\ludo.js":"5","D:\\Code\\ReactJs\\rough\\src\\components\\paintHouse\\PaintHouse.js":"6","D:\\Code\\ReactJs\\rough\\src\\components\\blockPuzzle\\BlockPuzzle.js":"7","D:\\Code\\ReactJs\\rough\\src\\components\\lockpick\\LockPick.js":"8","D:\\Code\\ReactJs\\rough\\src\\components\\switchBox\\SwitchBox.js":"9","D:\\Code\\ReactJs\\rough\\src\\components\\wordSearch\\WordSearch.js":"10","D:\\Code\\ReactJs\\rough\\src\\components\\infLoops\\levels.js":"11","D:\\Code\\ReactJs\\rough\\src\\components\\blockPuzzle\\allShapes.js":"12","D:\\Code\\ReactJs\\rough\\src\\components\\infLoops\\cells.js":"13","D:\\Code\\ReactJs\\rough\\src\\components\\ludo\\pieces.js":"14","D:\\Code\\ReactJs\\rough\\src\\components\\lockpick\\spring.js":"15","D:\\Github\\bluelab\\src\\index.js":"16","D:\\Github\\bluelab\\src\\App.js":"17","D:\\Github\\bluelab\\src\\reportWebVitals.js":"18","D:\\Github\\bluelab\\src\\components\\bezcrv\\bezcrv.js":"19","D:\\Github\\bluelab\\src\\components\\invkin\\invkin.js":"20","D:\\Github\\bluelab\\src\\components\\ropesim\\ropesim.js":"21","D:\\Github\\bluelab\\src\\components\\ropesim\\items.js":"22","D:\\Github\\bluelab\\src\\components\\clothsim\\clothsim.js":"23","D:\\Github\\bluelab\\src\\components\\clothsim\\items.js":"24"},{"size":1592,"mtime":1632651157108,"results":"25","hashOfConfig":"26"},{"size":539,"mtime":1632651170259,"results":"27","hashOfConfig":"26"},{"size":362,"mtime":499162500000,"results":"28","hashOfConfig":"26"},{"size":7171,"mtime":1623564962469,"results":"29","hashOfConfig":"26"},{"size":7163,"mtime":1632593569558,"results":"30","hashOfConfig":"26"},{"size":11450,"mtime":1612116796839,"results":"31","hashOfConfig":"26"},{"size":9038,"mtime":1624372254019,"results":"32","hashOfConfig":"26"},{"size":2758,"mtime":1622830986188,"results":"33","hashOfConfig":"26"},{"size":1098,"mtime":1608575432984,"results":"34","hashOfConfig":"26"},{"size":8135,"mtime":1623569086161,"results":"35","hashOfConfig":"26"},{"size":2831,"mtime":1618826356839,"results":"36","hashOfConfig":"26"},{"size":401,"mtime":1624372356242,"results":"37","hashOfConfig":"26"},{"size":2107,"mtime":1610642374821,"results":"38","hashOfConfig":"26"},{"size":5223,"mtime":1618828287577,"results":"39","hashOfConfig":"26"},{"size":1099,"mtime":1622757192751,"results":"40","hashOfConfig":"26"},{"size":1078,"mtime":1648455546230,"results":"41","hashOfConfig":"42"},{"size":2298,"mtime":1648462678828,"results":"43","hashOfConfig":"42"},{"size":362,"mtime":499162500000,"results":"44","hashOfConfig":"42"},{"size":5328,"mtime":1632768845194,"results":"45","hashOfConfig":"42"},{"size":3459,"mtime":1645720643240,"results":"46","hashOfConfig":"42"},{"size":4484,"mtime":1648456179006,"results":"47","hashOfConfig":"42"},{"size":1063,"mtime":1645813125838,"results":"48","hashOfConfig":"42"},{"size":5011,"mtime":1648462406177,"results":"49","hashOfConfig":"42"},{"size":1480,"mtime":1648462036615,"results":"50","hashOfConfig":"42"},{"filePath":"51","messages":"52","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"iyky5x",{"filePath":"53","messages":"54","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"55","messages":"56","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"57"},{"filePath":"58","messages":"59","errorCount":0,"fatalErrorCount":0,"warningCount":17,"fixableErrorCount":0,"fixableWarningCount":0,"source":"60","usedDeprecatedRules":"57"},{"filePath":"61","messages":"62","errorCount":0,"fatalErrorCount":0,"warningCount":33,"fixableErrorCount":0,"fixableWarningCount":0,"source":"63","usedDeprecatedRules":"57"},{"filePath":"64","messages":"65","errorCount":0,"fatalErrorCount":0,"warningCount":21,"fixableErrorCount":0,"fixableWarningCount":0,"source":"66","usedDeprecatedRules":"57"},{"filePath":"67","messages":"68","errorCount":0,"fatalErrorCount":0,"warningCount":32,"fixableErrorCount":0,"fixableWarningCount":0,"source":"69","usedDeprecatedRules":"57"},{"filePath":"70","messages":"71","errorCount":0,"fatalErrorCount":0,"warningCount":6,"fixableErrorCount":0,"fixableWarningCount":0,"source":"72","usedDeprecatedRules":"57"},{"filePath":"73","messages":"74","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"57"},{"filePath":"75","messages":"76","errorCount":0,"fatalErrorCount":0,"warningCount":22,"fixableErrorCount":0,"fixableWarningCount":0,"source":"77","usedDeprecatedRules":"57"},{"filePath":"78","messages":"79","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"57"},{"filePath":"80","messages":"81","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"57"},{"filePath":"82","messages":"83","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"84","usedDeprecatedRules":"57"},{"filePath":"85","messages":"86","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"87","usedDeprecatedRules":"57"},{"filePath":"88","messages":"89","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"90","usedDeprecatedRules":"57"},{"filePath":"91","messages":"92","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"1nqmehk",{"filePath":"93","messages":"94","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"95","messages":"96","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"97"},{"filePath":"98","messages":"99","errorCount":0,"fatalErrorCount":0,"warningCount":7,"fixableErrorCount":0,"fixableWarningCount":2,"source":"100","usedDeprecatedRules":"97"},{"filePath":"101","messages":"102","errorCount":0,"fatalErrorCount":0,"warningCount":10,"fixableErrorCount":0,"fixableWarningCount":2,"source":"103","usedDeprecatedRules":"97"},{"filePath":"104","messages":"105","errorCount":0,"fatalErrorCount":0,"warningCount":12,"fixableErrorCount":0,"fixableWarningCount":2,"source":null},{"filePath":"106","messages":"107","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"108","usedDeprecatedRules":"97"},{"filePath":"109","messages":"110","errorCount":0,"fatalErrorCount":0,"warningCount":14,"fixableErrorCount":0,"fixableWarningCount":2,"source":null},{"filePath":"111","messages":"112","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"D:\\Code\\ReactJs\\rough\\src\\index.js",[],"D:\\Code\\ReactJs\\rough\\src\\App.js",[],"D:\\Code\\ReactJs\\rough\\src\\reportWebVitals.js",[],["113","114"],"D:\\Code\\ReactJs\\rough\\src\\components\\infLoops\\InfLoops.js",["115","116","117","118","119","120","121","122","123","124","125","126","127","128","129","130","131"],"import React, {useState, useEffect} from 'react';\r\nimport './infLoops.css';\r\n\r\nimport {\r\n OneCell,\r\n TwoLcell,\r\n TwoLineCell,\r\n Threecell,\r\n FourCell\r\n} from './cells.js';\r\n\r\nimport levels from './levels.js';\r\n\r\nexport default class InfLoops extends React.PureComponent{\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n arr: [\r\n [0,0,0,0,0,0,0,0],\r\n [0,0,0,0,0,0,0,0],\r\n [0,0,0,0,0,0,0,0],\r\n [0,0,0,0,0,0,0,0],\r\n [0,0,0,0,0,0,0,0],\r\n [0,0,0,0,0,0,0,0],\r\n [0,0,0,0,0,0,0,0],\r\n [0,0,0,0,0,0,0,0]\r\n ],\r\n color: \"#5c6374\",\r\n level: 0,\r\n isCompleted: false,\r\n devch: false\r\n }\r\n }\r\n\r\n oneStep(x){\r\n var y = Math.floor(x/4);\r\n x%=4;\r\n x+=1;\r\n x%=4;\r\n x+=4*y;\r\n return x;\r\n }\r\n\r\n oneTypeAhead(x){\r\n var y = Math.floor(x/4);\r\n y+=1;\r\n y%=6;\r\n x%=4;\r\n x+=4*y;\r\n return x;\r\n }\r\n\r\n isValid(i,j){\r\n var ln = this.state.arr.length;\r\n return i>=0 && j>=0 && i<ln && j<ln;\r\n }\r\n\r\n cellCon(i,j){\r\n var validStates = {\r\n 0: [],\r\n 1: [0],\r\n 2: [0,3],\r\n 3: [0,2],\r\n 4: [0,2,3],\r\n 5: [0,1,2,3]\r\n };\r\n\r\n var x = this.state.arr[i][j];\r\n\r\n var cm = validStates[Math.floor(x/4)];\r\n for (var k = 0; k < cm.length; k++) {\r\n cm[k]+=x%4;\r\n cm[k]%=4;\r\n }\r\n\r\n return cm;\r\n }\r\n\r\n hasWon(){\r\n if(this.state.level==0) return;\r\n console.log(\"Checking\");\r\n\r\n var chk = this.state.arr.map(function(row) {\r\n return row.slice();\r\n });\r\n\r\n var ln = chk.length;\r\n\r\n var d = [[-1,0],[0,1],[1,0],[0,-1]]\r\n\r\n for (var i = 0; i < ln; i++) {\r\n for (var j = 0; j < ln; j++) {\r\n var cm = this.cellCon(i,j);\r\n\r\n for (var k = 0; k < cm.length; k++) {\r\n var x1 = i+d[cm[k]][0],\r\n y1 = j+d[cm[k]][1];\r\n\r\n if(this.isValid(x1,y1)){\r\n if(!this.cellCon(x1,y1).includes((cm[k]+2)%4)) {\r\n return false;\r\n }\r\n }else{\r\n return false\r\n }\r\n }\r\n }\r\n }\r\n\r\n this.setState({color: \"#43de6a\", isCompleted: true});\r\n }\r\n\r\n rotateShuff(lv){\r\n // console.log(\"Lv\");\r\n\r\n var tmp = levels[\"level\"+lv].map(function(row) {\r\n return row.slice();\r\n });\r\n\r\n var ln = tmp.length;\r\n\r\n var tmp2 = tmp.map(function(row) {\r\n return row.slice();\r\n });\r\n\r\n for (var i = 0; i < ln; i++) {\r\n for (var j = 0; j < ln; j++) {\r\n var tp = Math.floor(tmp[i][j]/4);\r\n tmp[i][j]%=4;\r\n tmp[i][j]+=Math.floor(Math.random()*4);\r\n // tmp[i][j]=0;\r\n tmp[i][j]%=4;\r\n tmp[i][j]+=4*tp;\r\n if(i==0 && this.state.devch) break;\r\n }\r\n if(i==0 && this.state.devch) break;\r\n }\r\n\r\n this.setState({\r\n arr: tmp,\r\n level: lv,\r\n isCompleted: false,\r\n color: \"#5c6374\"\r\n });\r\n }\r\n\r\n playLevel(lv){\r\n if(levels[\"level\"+lv]!=null){\r\n this.rotateShuff(lv);\r\n }\r\n }\r\n\r\n rotCell(i,j,bt){\r\n // console.log(i,j);\r\n if(this.state.isCompleted) return;\r\n\r\n var tmp = this.state.arr.map(function(row) {\r\n return row.slice();\r\n });\r\n\r\n if(bt==0){\r\n tmp[i][j]=this.oneStep(tmp[i][j]);\r\n this.setState({arr: tmp}, ()=>{\r\n this.hasWon();\r\n });\r\n }else{\r\n if(this.state.level!=0) return;\r\n tmp[i][j]=this.oneTypeAhead(tmp[i][j]);\r\n this.setState({arr: tmp});\r\n }\r\n }\r\n\r\n floorGang(i,j){\r\n return Math.floor(this.state.arr[i][j]/4);\r\n }\r\n\r\n randArr(){\r\n var tmp = [\r\n [0,0,0,0,0,0,0,0],\r\n [0,0,0,0,0,0,0,0],\r\n [0,0,0,0,0,0,0,0],\r\n [0,0,0,0,0,0,0,0],\r\n [0,0,0,0,0,0,0,0],\r\n [0,0,0,0,0,0,0,0],\r\n [0,0,0,0,0,0,0,0],\r\n [0,0,0,0,0,0,0,0]\r\n ];\r\n\r\n var ln = tmp.length;\r\n\r\n for (var i = 0; i < ln; i++) {\r\n for (var j = 0; j < ln; j++) {\r\n if(i%(ln-1) + j%(ln-1) == 0){\r\n tmp[i][j] = Math.floor(Math.random()*12);\r\n }else if ((i%(ln-1))*(j%(ln-1)) == 0) {\r\n tmp[i][j] = Math.floor(Math.random()*20);\r\n }else{\r\n tmp[i][j] = Math.floor(Math.random()*24);\r\n }\r\n }\r\n }\r\n\r\n this.setState({arr: tmp});\r\n }\r\n\r\n componentWillMount(){\r\n window.addEventListener('contextmenu', event => event.preventDefault());\r\n window.addEventListener('keydown', (e) => {\r\n if(e.repeat) return;\r\n\r\n // flag = true;\r\n if (e.keyCode === 81) {\r\n console.log(\"CURR\");\r\n console.log(this.state.arr);\r\n // console.log(\"ORG\");\r\n // console.log(this.state.org);\r\n }\r\n\r\n if(e.keyCode>48 && e.keyCode<58){\r\n this.playLevel(e.keyCode-48)\r\n }\r\n\r\n if (e.keyCode == 32) {\r\n console.log(\"Space was pressed!\");\r\n }\r\n\r\n })\r\n\r\n this.randArr();\r\n }\r\n\r\n render(){\r\n return(\r\n <div className=\"boxapp\">\r\n <div className=\"infscreen\">\r\n <div className=\"infContainer\">\r\n {this.state.arr.map((row,i)=>{\r\n return (\r\n <div key={i} className=\"infrowContainer\">\r\n {row.map((sq,j)=>{\r\n return (\r\n <div\r\n className=\"infcont\"\r\n key={i*100+j}\r\n onMouseDown={(e)=>{\r\n this.rotCell(i,j,e.button);\r\n }}\r\n >\r\n {this.floorGang(i,j)==1?\r\n <OneCell\r\n rot={this.state.arr[i][j]%4}\r\n color={this.state.color}\r\n />\r\n :null}\r\n\r\n {this.floorGang(i,j)==2?\r\n <TwoLcell\r\n rot={this.state.arr[i][j]%4}\r\n color={this.state.color}\r\n />\r\n :null}\r\n\r\n {this.floorGang(i,j)==3?\r\n <TwoLineCell\r\n rot={this.state.arr[i][j]%4}\r\n color={this.state.color}\r\n />\r\n :null}\r\n\r\n {this.floorGang(i,j)==4?\r\n <Threecell\r\n rot={this.state.arr[i][j]%4}\r\n color={this.state.color}\r\n />\r\n :null}\r\n\r\n {this.floorGang(i,j)==5?\r\n <FourCell\r\n rot={this.state.arr[i][j]%4}\r\n color={this.state.color}\r\n />\r\n :null}\r\n </div>\r\n )\r\n })}\r\n </div>\r\n )\r\n })}\r\n </div>\r\n <div className=\"oth-options\">\r\n <div className=\"playoption\">\r\n <span>\r\n {this.state.level==0?\"Design\":\"Level \"+this.state.level}\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n","D:\\Code\\ReactJs\\rough\\src\\components\\ludo\\ludo.js",["132","133","134","135","136","137","138","139","140","141","142","143","144","145","146","147","148","149","150","151","152","153","154","155","156","157","158","159","160","161","162","163","164"],"import React, {useState, useEffect} from 'react';\r\nimport './ludo.css';\r\nimport './props.css';\r\n\r\nimport {\r\n LudoPiece\r\n} from './pieces.js';\r\n\r\nexport default class InfLoops extends React.PureComponent{\r\n constructor(props) {\r\n super(props);\r\n\r\n this.state = {\r\n nums: true,\r\n celln: -2,\r\n prev: 0,\r\n diceNum: 0,\r\n offsets: [50,11,24,37]\r\n }\r\n }\r\n\r\n incrementCell(x=0){\r\n if(this.state.celln<0 || x){\r\n if(this.state.diceNum==6){\r\n this.setState({celln: 0});\r\n }\r\n\r\n if(x==1){\r\n this.setState({celln: -1});\r\n }\r\n }else{\r\n var moveInt = setInterval(()=>{\r\n this.setState({celln: (this.state.celln+1)%52});\r\n if(this.state.celln -this.state.prev + 52*(this.state.prev>this.state.celln)>=this.state.diceNum){\r\n clearInterval(moveInt);\r\n }\r\n },170);\r\n }\r\n }\r\n\r\n throwDice(){\r\n this.setState({\r\n diceNum: Math.floor(Math.random()*6)+1,\r\n prev: this.state.celln\r\n },()=>{\r\n var dice = document.getElementById('dice');\r\n dice.classList.add('animDice');\r\n\r\n setTimeout(()=>{\r\n dice.classList.remove('animDice');\r\n },200);\r\n this.incrementCell();\r\n })\r\n }\r\n\r\n giveNum(x, ln){\r\n\r\n if(ln==0){\r\n if(x%3==0) return 23 - Math.floor(x/3);\r\n else if(x==1) return 24;\r\n else if(x%3==2) return 25 + Math.floor((x-2)/3);\r\n else return Math.floor((x-1)/3)+51;\r\n }\r\n\r\n if(ln==1){\r\n if(x>11) return 22-x;\r\n else if(x==6) return 11;\r\n else if(x<6) return 12+x;\r\n else return x+45;\r\n }\r\n\r\n if(ln==2){\r\n if(x<6) return 31+x;\r\n else if(x==11) return 37;\r\n else if(x>11) return 55-x;\r\n else return 62-x; //\r\n }\r\n\r\n if(ln==3){\r\n if(x%3==0) return (Math.floor((12-x)/3)+52)%52;\r\n else if(x==16) return 50;\r\n else if(x%3==2) return Math.floor((x-2)/3) + 44;\r\n else return Math.floor((13-x)/3)+52;\r\n }\r\n }\r\n\r\n specialCell(x, ln){\r\n var nm = this.giveNum(x, ln);\r\n\r\n var cs = \"\";\r\n\r\n if(nm>51 || nm%13==0){\r\n if(ln==0) cs+=\"greencell \";\r\n if(ln==1) cs+=\"redcell \";\r\n if(ln==2) cs+=\"yellowcell \";\r\n if(ln==3) cs+=\"bluecell \";\r\n }\r\n\r\n if(nm%13==0 && nm<52){\r\n cs+=\"star\";\r\n }\r\n\r\n if((nm+2)%13==0 && nm<52){\r\n if(ln==0) cs+=\"arrowcell greenarrow\";\r\n if(ln==1) cs+=\"arrowcell redarrow\";\r\n if(ln==2) cs+=\"arrowcell yellowarrow\";\r\n if(ln==3) cs+=\"arrowcell bluearrow\";\r\n }\r\n\r\n if((nm+5)%13==0 && nm<52){\r\n if(ln==0) cs+=\"starcell\";\r\n if(ln==1) cs+=\"starcell\";\r\n if(ln==2) cs+=\"starcell\";\r\n if(ln==3) cs+=\"starcell\";\r\n }\r\n\r\n return cs;\r\n }\r\n\r\n givePos(x){\r\n if(x>=0){\r\n var cell = document.getElementById('cell'+x);\r\n\r\n if(cell){\r\n return [cell.offsetTop, cell.offsetLeft];\r\n }else{\r\n return null;\r\n }\r\n }else{\r\n var cell = document.getElementById('blueh'+Math.abs(x));\r\n\r\n if(cell){\r\n return [cell.offsetTop, cell.offsetLeft];\r\n }else{\r\n return null;\r\n }\r\n }\r\n }\r\n\r\n componentWillMount(){\r\n setTimeout(()=>{\r\n this.incrementCell(1);\r\n },50);\r\n }\r\n\r\n render(){\r\n var a = [];\r\n for (var i = 0; i < 18; i++) {\r\n a.push(i);\r\n }\r\n\r\n return(\r\n <div className=\"boxapp\">\r\n <div className=\"ludoscreen\">\r\n <div className=\"ludoContainer\">\r\n <div className=\"layer1\">\r\n <div className=\"homeCont homeRed\">\r\n <div className=\"incell\"></div>\r\n <div className=\"incell\"></div>\r\n <div className=\"incell\"></div>\r\n <div className=\"incell\"></div>\r\n </div>\r\n <div className=\"sand1\">\r\n {a.map(x=>{\r\n return (\r\n <div\r\n className={\"bcell bcell1 \"+this.specialCell(x,0)}\r\n id={this.giveNum(x,0)!=null?\"cell\"+this.giveNum(x,0):null}\r\n key={x}>{this.state.nums?this.giveNum(x,0):null}</div>\r\n );\r\n })}\r\n </div>\r\n <div className=\"homeCont homeGreen\">\r\n <div className=\"incell\"></div>\r\n <div className=\"incell\"></div>\r\n <div className=\"incell\"></div>\r\n <div className=\"incell\"></div>\r\n </div>\r\n </div>\r\n <div className=\"layer2\">\r\n <div className=\"sand2\">\r\n {a.map(x=>{\r\n return (\r\n <div\r\n className={\"bcell bcell2 \"+this.specialCell(x,1)}\r\n id={this.giveNum(x,1)!=null?\"cell\"+this.giveNum(x,1):null}\r\n key={x}>{this.state.nums?this.giveNum(x,1):null}</div>\r\n );\r\n })}\r\n </div>\r\n <div className=\"destiny\"></div>\r\n <div className=\"sand3\">\r\n {a.map(x=>{\r\n return (\r\n <div\r\n className={\"bcell bcell2 \"+this.specialCell(x,2)}\r\n id={this.giveNum(x,2)!=null?\"cell\"+this.giveNum(x,2):null}\r\n key={x}>{this.state.nums?this.giveNum(x,2):null}</div>\r\n );\r\n })}\r\n </div>\r\n </div>\r\n <div className=\"layer3\">\r\n <div className=\"homeCont homeBlue\">\r\n <div className=\"incell\" id=\"blueh1\"></div>\r\n <div className=\"incell\" id=\"blueh2\"></div>\r\n <div className=\"incell\" id=\"blueh3\"></div>\r\n <div className=\"incell\" id=\"blueh4\"></div>\r\n </div>\r\n <div className=\"sand1\">\r\n {a.map(x=>{\r\n return (\r\n <div\r\n className={\"bcell bcell1 \"+this.specialCell(x,3)}\r\n id={\"cell\"+this.giveNum(x,3)}\r\n key={x}\r\n >{this.state.nums?this.giveNum(x,3):null}</div>\r\n );\r\n })}\r\n </div>\r\n <div className=\"homeCont homeYellow\">\r\n <div className=\"incell\"></div>\r\n <div className=\"incell\"></div>\r\n <div className=\"incell\"></div>\r\n <div className=\"incell\"></div>\r\n </div>\r\n </div>\r\n <div className=\"props\">\r\n <LudoPiece pos={this.givePos(this.state.celln)}/>\r\n </div>\r\n </div>\r\n <div className=\"btncell\">\r\n <button onClick={this.throwDice.bind(this)}>Move</button>\r\n <div className=\"dice\" id=\"dice\">\r\n <div className=\"face face1\"></div>\r\n <div className=\"face face2\"></div>\r\n <div className=\"face face3\"></div>\r\n <div className=\"face face4\"></div>\r\n <div className=\"face face5\"></div>\r\n <div className=\"face face6\"></div>\r\n <div className=\"diceNum\">{this.state.diceNum}</div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n","D:\\Code\\ReactJs\\rough\\src\\components\\paintHouse\\PaintHouse.js",["165","166","167","168","169","170","171","172","173","174","175","176","177","178","179","180","181","182","183","184","185"],"import React from 'react';\n\nimport './paintHouse.css';\n\nexport default class PaintHouse extends React.PureComponent {\n constructor(props) {\n super(props);\n this.state={\n arr: [\n [0,0,0,0,0,0,-1,0],\n [0,0,0,0,0,0,-1,0],\n [0,0,0,0,0,0,-1,0],\n [0,0,0,0,2,0,0,0],\n [0,0,0,0,0,0,0,0],\n [0,0,0,0,0,0,0,0],\n [0,0,0,-1,0,-1,-1,0],\n [0,0,0,0,0,0,0,0]\n ],\n\n levels: [\n [\n [0, 0,0,-1,0,0,0,0],\n [0,-1,0,-1,0,0,0,0],\n [0,-1,0,0,0,2,0,0],\n [0,0,0,0,0,0,0,0],\n [0,0,0,0,-1,0,0,0],\n [0,0,-1,0,0,0,0,0],\n [-1,0,0,-1,0,0,0,0],\n [-1,-1,0,0,0,0,0,0]\n ],\n [\n [0,0,0,0,0,0,-1,-1],\n [0,0,0,0,-1,0,0,0],\n [0,0,0,0,0,0,0,0],\n [0,0,0,0,2,0,0,0],\n [0,0,-1,0,0,0,0,0],\n [0,0,0,0,0,-1,0,0],\n [0,0,-1,-1,0,0,0,0],\n [-1,0,0,0,0,0,0,0]\n ],\n [\n [-1,0,0,0,-1,0,0,0],\n [0,0,-1,0,0,0,-1,0],\n [0,0,0,0,2,0,0,0],\n [0,0,0,0,0,0,0,-1],\n [0,0,0,-1,0,-1,0,0],\n [-1,0,0,-1,0,0,-1,0],\n [0,0,0,0,0,0,-1,0],\n [0,0,0,0,0,0,0,0]\n ],\n [\n [-1,0,0,0,0,-1,0,0],\n [0,0,0,-1,0,0,0,0],\n [0,-1,0,0,-1,0,0,0],\n [0,0,0,2,0,0,0,0],\n [0,0,0,-1,0,-1,0,0],\n [0,0,0,0,0,-1,0,0],\n [0,0,0,0,0,0,0,0],\n [0,0,0,0,0,0,0,0]\n ],\n [\n [0, 0, -1, 0, 0, 0, 0, 0],\n [-1, 0, -1, 0, -1, 0, 0, 0],\n [0, 0, 0, 0, -1, 0, 0, 0],\n [0, -1, 0, -1, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0, 0, 0],\n [0, 0, -1, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0, 0, 0]\n ]\n ],\n x: 3,\n y: 4,\n posx: 3,\n posy: 4,\n dim: 8,\n gameState: 0,\n tmp: 0\n }\n }\n\n isValid(xi,yi){\n return 0<=xi && xi<this.state.dim && 0<=yi && yi<this.state.dim\n }\n\n resetGame(edit=0){\n var arr = this.state.arr\n\n for (var i = 0; i < 8; i++) {\n for (var j = 0; j < 8; j++) {\n if(arr[i][j]!=-1){\n arr[i][j]=0\n }\n }\n }\n\n // arr[posx][posy] = 1\n if(edit!=-1){\n edit = 0\n }\n\n this.setState({\n arr: arr,\n x: this.state.posx,\n y: this.state.posy,\n gameState: edit\n })\n }\n\n setLevel(lv){\n console.log(\"level: \",lv);\n var arr = this.state.levels[lv]\n\n for (var i = 0; i < 8; i++) {\n for (var j = 0; j < 8; j++) {\n if(arr[i][j]==2){\n this.setState({\n arr: arr,\n posx: i,\n posy: j,\n x: i,\n y: j,\n gameState: 0,\n tmp: this.state.tmp^1\n })\n return\n }\n }\n }\n }\n\n editLevel(){\n this.resetGame(-1);\n }\n\n toggleCell(xi,yi,lb){\n if(this.state.gameState!=-1) return;\n\n // console.log(\"Toggling \",xi,yi);\n var arr = this.state.arr\n if(lb==0){\n if(arr[xi][yi]<1){\n arr[xi][yi]+=1\n arr[xi][yi]*=-1\n // console.log(\"Updating \",xi,yi);\n this.setState({arr: arr, tmp: this.state.tmp^1})\n }\n }else{\n if(arr[xi][yi]==0){\n arr[this.state.posx][this.state.posy]=0\n arr[xi][yi]=2\n // console.log(\"Updating move \",xi,yi);\n this.setState({posx:xi, posy:yi, x:xi, y:yi, arr: arr, tmp: this.state.tmp^1})\n }\n }\n }\n\n checkFailure(){\n var x = this.state.x,\n y = this.state.y\n\n for (var i = -1; i < 2; i++) {\n for (var j = -1; j < 2; j++) {\n if(Math.abs(i+j)==1 && this.isValid(x+i,y+j)){\n if(this.state.arr[x+i][y+j]==0) return\n }\n }\n }\n\n var leftOver = 0\n\n for (var i = 0; i < 8; i++) {\n for (var j = 0; j < 8; j++) {\n if(this.state.arr[i][j]==0 && i!=this.state.x && j!=this.state.y){\n leftOver+=1\n }\n }\n }\n\n if(leftOver>0){\n console.log(\"Over\");\n this.setState({gameState: 2})\n }else{\n console.log(\"Won\");\n this.setState({gameState: 1})\n }\n\n }\n\n move(dx,dy){\n if(this.state.gameState!=0) return;\n\n var x = this.state.x,\n y = this.state.y,\n arr = this.state.arr\n\n\n this.setState({x: x,y: y, arr: arr})\n\n var keepMoving = setInterval(()=>{\n if(this.isValid(x+dx,y+dy)){\n if(arr[x+dx][y+dy]==0){\n arr[x][y] = 1\n x+=dx\n y+=dy\n this.setState({x: x,y: y, arr: arr}, ()=>{\n this.checkFailure()\n })\n }else{\n clearInterval(keepMoving)\n }\n }else{\n clearInterval(keepMoving)\n }\n }, 50)\n\n }\n\n componentWillMount(){\n window.addEventListener('contextmenu', event => event.preventDefault());\n\n window.addEventListener('keydown', (e) => {\n\n if(e.keyCode>48 && e.keyCode<49+this.state.levels.length){\n this.setLevel(e.keyCode-49)\n }\n\n if (e.keyCode === 82) {\n // console.log('Left')\n this.resetGame()\n }\n\n if (e.keyCode === 69) {\n // console.log('Left')\n this.editLevel()\n }\n\n if (e.keyCode === 65 || e.keyCode === 37) {\n // console.log('Left')\n this.move(0,-1)\n }\n\n else if (e.keyCode === 87 || e.keyCode === 38) {\n // console.log('Up')\n this.move(-1,0)\n }\n\n else if (e.keyCode === 68 || e.keyCode === 39) {\n // console.log('Right')\n this.move(0,1)\n }\n\n else if (e.keyCode === 83 || e.keyCode === 40) {\n // console.log('Down')\n this.move(1,0)\n }\n\n else if (e.keyCode === 81) {\n console.log(this.state.arr);\n }\n });\n }\n\n render(){\n var x = this.state.x,\n y = this.state.y,\n dim = this.state.dim\n\n x = (x*82).toString()+\"px\"\n y = (y*82).toString()+\"px\"\n\n return(\n <div className=\"boxapp\">\n <div className=\"gamescreen\">\n <div className=\"paintContainer\">\n {this.state.arr.map((row,i)=>{\n return (\n <div key={i*1247} className=\"rowContainer\">\n {row.map((sq,j)=>{\n if(this.state.arr[i][j]==0){\n return (\n <div\n className=\"sqb\"\n onMouseDown={(event)=>{\n this.toggleCell(i,j,event.button)\n }}\n key={i*100+j}></div>\n )\n }else if (this.state.arr[i][j]==-1) {\n return (\n <div\n className=\"sqb obst\"\n onMouseDown={(event)=>{\n this.toggleCell(i,j,event.button)\n }}\n key={i*100+j}></div>\n )\n }else{\n return <div className=\"sqb filledSq\" key={i*100+j}></div>\n }\n })}\n </div>\n )\n })}\n <div\n className=\"brush\"\n style={{\n position: \"absolute\",\n top: x,\n left: y }}></div>\n\n {this.state.gameState==1?\n <div\n onClick={this.resetGame.bind(this)}\n className=\"banner\">Level Complete</div>:null}\n {this.state.gameState==2?\n <div\n onClick={this.resetGame.bind(this)}\n className=\"banner\">Game Over</div>:null}\n </div>\n <div className=\"oth-options\">\n <div className=\"playoption\">\n <div className={this.state.gameState==-1?\"svgcontainer selected\":\"svgcontainer\"} onClick={this.editLevel.bind(this)}>\n <svg className=\"svgicon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"30px\" height=\"30px\" viewBox=\"-15 -15 484.00019 484\" enableBackground=\"new -15 -15 484.00019 484\">\n <path d=\"m401.648438 18.234375c-24.394532-24.351563-63.898438-24.351563-88.292969 0l-22.101563 22.222656-235.269531 235.144531-.5.503907c-.121094.121093-.121094.25-.25.25-.25.375-.625.746093-.871094 1.121093 0 .125-.128906.125-.128906.25-.25.375-.371094.625-.625 1-.121094.125-.121094.246094-.246094.375-.125.375-.25.625-.378906 1 0 .121094-.121094.121094-.121094.25l-52.199219 156.96875c-1.53125 4.46875-.367187 9.417969 2.996094 12.734376 2.363282 2.332031 5.550782 3.636718 8.867188 3.625 1.355468-.023438 2.699218-.234376 3.996094-.625l156.847656-52.324219c.121094 0 .121094 0 .25-.121094.394531-.117187.773437-.285156 1.121094-.503906.097656-.011719.183593-.054688.253906-.121094.371094-.25.871094-.503906 1.246094-.753906.371093-.246094.75-.621094 1.125-.871094.125-.128906.246093-.128906.246093-.25.128907-.125.378907-.246094.503907-.5l257.371093-257.371094c24.351563-24.394531 24.351563-63.898437 0-88.289062zm-232.273438 353.148437-86.914062-86.910156 217.535156-217.535156 86.914062 86.910156zm-99.15625-63.808593 75.929688 75.925781-114.015626 37.960938zm347.664062-184.820313-13.238281 13.363282-86.917969-86.917969 13.367188-13.359375c14.621094-14.609375 38.320312-14.609375 52.945312 0l33.964844 33.964844c14.511719 14.6875 14.457032 38.332031-.121094 52.949218zm0 0\"/>\n </svg>\n </div>\n <span>\n Edit\n </span>\n </div>\n <div className=\"playoption\">\n <div className=\"svgcontainer\" onClick={this.resetGame.bind(this)}>\n <svg className=\"svgicon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"30px\" height=\"30px\" viewBox=\"0 0 438.536 438.536\" enableBackground=\"new 0 0 438.536 438.536\">\n <g>\n <path d=\"M421.125,134.191c-11.608-27.03-27.217-50.347-46.819-69.949C354.7,44.639,331.384,29.033,304.353,17.42 C277.325,5.807,248.969,0.005,219.275,0.005c-27.978,0-55.052,5.277-81.227,15.843C111.879,26.412,88.61,41.305,68.243,60.531 l-37.12-36.835c-5.711-5.901-12.275-7.232-19.701-3.999C3.807,22.937,0,28.554,0,36.547v127.907c0,4.948,1.809,9.231,5.426,12.847 c3.619,3.617,7.902,5.426,12.85,5.426h127.907c7.996,0,13.61-3.807,16.846-11.421c3.234-7.423,1.903-13.988-3.999-19.701 l-39.115-39.398c13.328-12.563,28.553-22.222,45.683-28.98c17.131-6.757,35.021-10.138,53.675-10.138 c19.793,0,38.687,3.858,56.674,11.563c17.99,7.71,33.544,18.131,46.679,31.265c13.134,13.131,23.555,28.69,31.265,46.679 c7.703,17.987,11.56,36.875,11.56,56.674c0,19.798-3.856,38.686-11.56,56.672c-7.71,17.987-18.131,33.544-31.265,46.679 c-13.135,13.134-28.695,23.558-46.679,31.265c-17.987,7.707-36.881,11.561-56.674,11.561c-22.651,0-44.064-4.949-64.241-14.843 c-20.174-9.894-37.209-23.883-51.104-41.973c-1.331-1.902-3.521-3.046-6.567-3.429c-2.856,0-5.236,0.855-7.139,2.566 l-39.114,39.402c-1.521,1.53-2.33,3.478-2.426,5.853c-0.094,2.385,0.527,4.524,1.858,6.427 c20.749,25.125,45.871,44.587,75.373,58.382c29.502,13.798,60.625,20.701,93.362,20.701c29.694,0,58.05-5.808,85.078-17.416 c27.031-11.607,50.34-27.22,69.949-46.821c19.605-19.609,35.211-42.921,46.822-69.949s17.411-55.392,17.411-85.08 C438.536,189.569,432.732,161.22,421.125,134.191z\"/>\n </g>\n </svg>\n </div>\n <span>\n Restart\n </span>\n </div>\n </div>\n </div>\n </div>\n );\n }\n}\n","D:\\Code\\ReactJs\\rough\\src\\components\\blockPuzzle\\BlockPuzzle.js",["186","187","188","189","190","191","192","193","194","195","196","197","198","199","200","201","202","203","204","205","206","207","208","209","210","211","212","213","214","215","216","217"],"import React, {useState, useEffect} from 'react';\r\nimport './blockPuzzle.css';\r\n\r\nimport allShapes from './allShapes.js';\r\n\r\nconst BlockPuzzle = ()=>{\r\n const [arr, setArr] = useState([]);\r\n const [ovArr, setOverArr] = useState([]);\r\n const [rows, setRow] = useState(6);\r\n const [shapes, setShapes] = useState(allShapes);\r\n const [fshp, setFshp] = useState([]);\r\n const [shape, setShape] = useState(\"\");\r\n const [shcell, setShcell] = useState(48);\r\n const [isPlay, setPlay] = useState(true);\r\n const [offSet, setOff] = useState([0,0]);\r\n const [dshape, setDShape] = useState(0);\r\n const [shArr, setShArr] = useState([]);\r\n\r\n const dragStart = (e)=>{\r\n var img = new Image();\r\n img.src = null;\r\n e.dataTransfer.setDragImage(img, 0, 0);\r\n\r\n if(!isPlay){\r\n var idx = e.target.dataset.idx;\r\n if(!idx) return;\r\n if(idx.length<2) idx = '0'+idx;\r\n setShape(idx);\r\n }else{\r\n var sh = e.target.dataset.sh,\r\n sp = e.target.dataset.sp,\r\n px = e.target.dataset.px,\r\n py = e.target.dataset.py;\r\n\r\n if(sh && sp && px && py){\r\n setDShape(sh);\r\n setOff([px,py]);\r\n var tmp = [],\r\n str = shapes[sh];\r\n\r\n for (var i = 0; i < rows; i++) tmp.push([]);\r\n\r\n var r1=-1,r2=-1,c1=-1,c2=-1;\r\n\r\n for (var i = 0; i < str.length; i+=2) {\r\n var j = (parseInt(sp)+i)%str.length,\r\n cp = str.substring(j,j+2);\r\n\r\n cp = parseInt(cp);\r\n var cx = Math.floor(cp/rows),\r\n cy = cp%rows;\r\n\r\n tmp[cx][cy] = 1;\r\n }\r\n\r\n\r\n for (var i = 0; i < tmp.length; i++) {\r\n var isFill = false;\r\n for (var j = 0; j < tmp[i].length; j++) isFill|=tmp[i][j]!=null;\r\n if(r1==-1 && isFill) r1 = i;\r\n if(isFill) r2 = i;\r\n }\r\n\r\n for (var j = 0; j < rows; j++) {\r\n var isFill = false;\r\n for (var i = 0; i < rows; i++) isFill|=tmp[i][j]!=null;\r\n if(c1==-1 && isFill) c1 = j;\r\n if(isFill) c2 = j;\r\n }\r\n\r\n var sharr = tmp.map((row, i)=>{\r\n if(i<r1 || i>r2) return null;\r\n var rmp = [];\r\n for (var j = c1; j < c2+1; j++) {\r\n rmp.push(row[j]!=null?parseInt(sh):-1);\r\n }\r\n\r\n return rmp;\r\n }).filter(x=> x!=null);\r\n\r\n setShArr(sharr);\r\n }\r\n }\r\n }\r\n\r\n const dragOver = (e)=>{\r\n e.preventDefault();\r\n var idx = e.target.dataset.idx;\r\n if(!idx) return;\r\n\r\n if(!isPlay){\r\n if(idx.length<2) idx = '0'+idx;\r\n var sh = shape;\r\n if(!sh.endsWith(idx)) setShape(sh+idx);\r\n }else{\r\n var tmpArr = [],\r\n isValid = true,\r\n cx = Math.floor(idx/rows),\r\n cy = idx%rows;\r\n\r\n for (var i = 0; i < rows; i++) tmpArr.push([]);\r\n\r\n for (var i = 0; i < shArr.length; i++) {\r\n for (var j = 0; j < shArr[i].length; j++) {\r\n var px = cx+i-offSet[0],\r\n py = cy+j-offSet[1];\r\n\r\n if(px<0 || px>rows-1 || py<0 || py>rows-1) return;\r\n\r\n if(arr[px][py]!=-1 && shArr[i][j]!=-1) return;\r\n\r\n if(arr[px][py]==-1){\r\n tmpArr[px][py] = shArr[i][j];\r\n }\r\n }\r\n }\r\n\r\n setOverArr(tmpArr);\r\n }\r\n }\r\n\r\n const dragDrop = (e)=>{\r\n setOverArr([]);\r\n\r\n e.preventDefault();\r\n var idx = e.target.dataset.idx;\r\n if(!idx){\r\n setOff([0,0]);\r\n setShArr([]);\r\n return;\r\n };\r\n\r\n if(!isPlay){\r\n var tmpshapes = [...shapes];\r\n tmpshapes.push(shape);\r\n setShapes(tmpshapes);\r\n }else{\r\n var tmpArr = [...arr],\r\n isValid = true,\r\n cx = Math.floor(idx/rows),\r\n cy = idx%rows;\r\n\r\n for (var i = 0; i < rows; i++) tmpArr.push([]);\r\n\r\n for (var i = 0; i < shArr.length; i++) {\r\n for (var j = 0; j < shArr[i].length; j++) {\r\n var px = cx+i-offSet[0],\r\n py = cy+j-offSet[1];\r\n\r\n if(px<0 || px>rows-1 || py<0 || py>rows-1){\r\n setOff([0,0]);\r\n setShArr([]);\r\n return;\r\n };\r\n\r\n if(shArr[i]==null || (tmpArr[px][py]!=-1 && shArr[i][j]!=-1)){\r\n setOff([0,0]);\r\n setShArr([]);\r\n return;\r\n };\r\n\r\n if(tmpArr[px][py]==-1){\r\n tmpArr[px][py] = shArr[i][j];\r\n }\r\n }\r\n }\r\n\r\n var tfshp = [...fshp];\r\n tfshp.push(shapes[dshape]);\r\n setFshp(tfshp);\r\n setArr(tmpArr);\r\n }\r\n\r\n }\r\n\r\n const rainBowColor = (idx)=>{\r\n if(idx==-1){\r\n return 'inherit';\r\n }\r\n\r\n var i = (idx * 255 / shapes.length);\r\n var r = Math.round(Math.sin(0.024 * i + 0) * 127 + 128);\r\n var g = Math.round(Math.sin(0.024 * i + 2) * 127 + 128);\r\n var b = Math.round(Math.sin(0.024 * i + 4) * 127 + 128);\r\n return 'rgb(' + r + ',' + g + ',' + b + ')';\r\n }\r\n\r\n const shapeDiv = ()=>{\r\n return shapes.map((shp,idx)=>{\r\n if(fshp.includes(shp) && isPlay) return null;\r\n\r\n var tmp = [];\r\n for (var i = 0; i < rows; i++) tmp.push([]);\r\n\r\n for (var j = 0; j < shp.length; j+=2) {\r\n var cp = shp.substring(j,j+2);\r\n cp = parseInt(cp);\r\n var cx = Math.floor(cp/rows),\r\n cy = cp%rows;\r\n\r\n tmp[cx][cy] = j;\r\n }\r\n\r\n var r1=-1,r2=-1,c1=-1,c2=-1;\r\n\r\n for (var i = 0; i < tmp.length; i++) {\r\n var isFill = false;\r\n for (var j = 0; j < tmp[i].length; j++) isFill|=tmp[i][j]!=null;\r\n if(r1==-1 && isFill) r1 = i;\r\n if(isFill) r2 = i;\r\n }\r\n\r\n for (var j = 0; j < rows; j++) {\r\n var isFill = false;\r\n for (var i = 0; i < rows; i++) isFill|=tmp[i][j]!=null;\r\n if(c1==-1 && isFill) c1 = j;\r\n if(isFill) c2 = j;\r\n }\r\n\r\n var sdiv = (\r\n <div className=\"shapeCont\" style={{\r\n width: shcell*(c2-c1+1),\r\n height: shcell*(r2-r1+1),\r\n display: 'grid',\r\n gridTemplateColumns: `repeat(${c2-c1+1},minmax(0,1fr))`\r\n }}>\r\n {tmp.map((row, i)=>{\r\n if(i<r1 || i>r2) return null;\r\n var rmp = [];\r\n for (var j = c1; j < c2+1; j++) {\r\n rmp.push(\r\n <div className=\"shcell\" data-sh={idx}\r\n data-px={i-r1} data-py={j-c1} data-sp={row[j]}\r\n draggable={isPlay && row[j]!=null} style={{\r\n width: shcell,\r\n height: shcell,\r\n background: rainBowColor(row[j]!=null?idx:-1)\r\n }}></div>\r\n )\r\n }\r\n\r\n return rmp;\r\n })}\r\n </div>\r\n );\r\n\r\n return sdiv;\r\n });\r\n }\r\n\r\n useEffect(() => {\r\n window.addEventListener('dragstart', dragStart);\r\n window.addEventListener('dragover', dragOver);\r\n window.addEventListener('drop', dragDrop);\r\n\r\n return ()=>{\r\n window.removeEventListener('dragstart', dragStart);\r\n window.removeEventListener('dragover', dragOver);\r\n window.removeEventListener('drop', dragDrop);\r\n };\r\n });\r\n\r\n useEffect(()=>{\r\n\r\n var tmp = [];\r\n for (var i = 0; i < rows; i++) {\r\n tmp.push([]);\r\n for (var j = 0; j < rows; j++) {\r\n tmp[i].push(-1);\r\n }\r\n }\r\n\r\n if(!isPlay){\r\n for (var i = 0; i < shapes.length; i++) {\r\n var str = shapes[i];\r\n for (var j = 0; j < str.length; j+=2) {\r\n var cp = str.substring(j,j+2);\r\n cp = parseInt(cp);\r\n var cx = Math.floor(cp/rows),\r\n cy = cp%rows;\r\n\r\n tmp[cx][cy] = i;\r\n }\r\n }\r\n }\r\n\r\n setArr(tmp);\r\n\r\n },[shapes]);\r\n\r\n useEffect(()=>{\r\n if(!isPlay){\r\n setShapes([]);\r\n }else{\r\n var tmp = [];\r\n for (var i = 0; i < rows; i++) {\r\n tmp.push([]);\r\n for (var j = 0; j < rows; j++) {\r\n tmp[i].push(-1);\r\n }\r\n }\r\n\r\n setArr(tmp);\r\n setFshp([]);\r\n }\r\n },[isPlay])\r\n\r\n return (\r\n <div className=\"boxapp\">\r\n <div className=\"container\">\r\n <div className=\"piecesCont\">\r\n {shapeDiv()}\r\n </div>\r\n <div className=\"blockCont\" style={{\r\n width: '700px',\r\n height: '700px',\r\n display: 'grid',\r\n gridTemplateColumns: `repeat(${rows},minmax(0,1fr))`\r\n }}>\r\n {arr.map((row,x)=>{\r\n var wrow = [];\r\n for (var y = 0; y < row.length; y++) {\r\n wrow.push(\r\n <div className=\"pcell\" data-idx={x*rows + y}\r\n data-isOver={ovArr[x] && ovArr[x][y]>=0}\r\n draggable={!isPlay || row[y]>=0} style={{\r\n width: 700/rows,\r\n height: 700/rows,\r\n background: rainBowColor(row[y])\r\n }}></div>\r\n );\r\n }\r\n\r\n return wrow;\r\n })}\r\n </div>\r\n <div className=\"btnCont\">\r\n <div className=\"swbtn\" onClick={()=>{\r\n setPlay(!isPlay);\r\n }}>{isPlay?'Play Mode':'Build Mode'}</div>\r\n </div>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default BlockPuzzle;\r\n","D:\\Code\\ReactJs\\rough\\src\\components\\lockpick\\LockPick.js",["218","219","220","221","222","223"],"import React, {useState, useEffect} from 'react';\n\nimport './lockPick.css';\nimport {\n Spring,\n EmptyHolder,\n SpButton,\n BluePin\n} from './spring';\n\nconst LockPick = () => {\n const [picks, setPicks] = useState([]);\n const [pcount, setCount] = useState(5);\n const [pnum, setPnum] = useState(0);\n const [done, setDone] = useState(0);\n // const [password, setPass] = useState(11211);\n const [password, setPass] = useState(41324);\n\n const [seconds, setSeconds] = useState(0);\n\n if(!picks.length){\n var tmp = [];\n for (var i = 0; i < pcount; i++) {\n tmp.push(0);\n }\n\n setPicks(tmp);\n }\n\n const f = (v)=>{\n var d = Math.floor(v/3);\n if(d&1) return 3 - v%3;\n else return v%3;\n }\n\n const check = (tpicks)=>{\n var x = 0;\n for (var i = 0; i < pcount; i++) {\n x *= 10;\n x += f(tpicks[i]) + 1;\n }\n\n if(x==password){\n setDone(1);\n }\n }\n\n const incPick = (idx)=>{\n if(done) return;\n\n var tmp = [...picks];\n tmp[idx]+=1;\n\n setPicks(picks => tmp);\n }\n\n const fx = ()=>{\n var d = Math.floor(pnum/(pcount-1));\n if(d&1) return pcount - pnum%(pcount-1) - 1;\n else return pnum%(pcount-1);\n }\n\n const rotPick = (event)=>{\n if(done) return;\n\n var picker = event.target;\n picker.classList.add('tilt');\n picker.parentElement.children[1].classList.add('perTilt');\n setTimeout(()=>{\n incPick(fx());\n picker.classList.remove('tilt');\n picker.parentElement.children[1].classList.remove('perTilt');\n // setPnum(pnum+1);\n },200);\n }\n\n useEffect(() => {\n\n const interval = setInterval(() => {\n setPnum(pnum => pnum + 1);\n }, 1000);\n\n return () => clearInterval(interval);\n }, []);\n\n useEffect(()=>{\n check(picks);\n }, [picks]);\n\n return(\n <div className=\"boxapp\">\n <div className=\"container aright\">\n <div className=\"lockCont\">\n <div className=\"picksCont\">\n {picks.map((pick, idx)=>{\n return (\n <div className=\"pick\" key={idx}>\n <EmptyHolder/>\n <EmptyHolder/>\n <EmptyHolder/>\n <EmptyHolder/>\n <Spring h={pick}/>\n <SpButton/>\n <BluePin h={pick} done={done}/>\n </div>\n )\n })}\n </div>\n </div>\n <div className=\"toolsCont\">\n <div className=\"pickerCont\"\n onClick={rotPick}\n style={{\n left: (fx(pnum)*100*(1-done))+'px'\n }}>\n <div className=\"picker\"></div>\n <div className=\"peck\"></div>\n </div>\n <div className=\"wrench\"></div>\n </div>\n </div>\n </div>\n );\n}\n\nexport default LockPick;\n","D:\\Code\\ReactJs\\rough\\src\\components\\switchBox\\SwitchBox.js",[],"D:\\Code\\ReactJs\\rough\\src\\components\\wordSearch\\WordSearch.js",["224","225","226","227","228","229","230","231","232","233","234","235","236","237","238","239","240","241","242","243","244","245"],"import React, {useState, useEffect} from 'react';\r\nimport './wordSearch.css';\r\n\r\nexport default class WordSearch extends React.PureComponent{\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n rows: 16,\r\n wcell: 42,\r\n words: [\r\n [\"UNESCAPE\",2,2,1,1],\r\n [\"GAME\",4,1,0,1],\r\n [\"CIRCUMSTANCES\",1,14,1,0],\r\n [\"SURVIVE\",4,15,1,-1],\r\n [\"LEVEL\",9,8,0,1],\r\n [\"CHALLENGING\",11,1,-1,0],\r\n [\"DIFFICULTY\",14,2,0,1],\r\n [\"EFFORTFUL\",8,12,-1,-1],\r\n [\"FAILURE\",1,9,0,-1],\r\n [\"RIDDLE\",15,6,-1,0],\r\n [\"PROBLEM\",11,10,0,-1],\r\n [\"BLUEEDGE\",10,3,-1,1],\r\n [\"MAZE\",7,3,1,1],\r\n [\"SEARCH\",12,15,0,-1],\r\n [\"HELPME\",10,1,-1,1],\r\n [\"BREAKAWAY\",7,13,1,0]\r\n ],\r\n found: [],\r\n fstart: [0,0],\r\n fend: [0,0],\r\n dragging: false,\r\n vdrag: false,\r\n arr: []\r\n }\r\n }\r\n\r\n giveColor(idx){\r\n var idx = (idx * 729)%360;\r\n var r = Math.round(Math.sin(0.024 * idx + 0) * 256),\r\n g = Math.round(Math.sin(0.024 * idx + 2) * 256),\r\n b = Math.round(Math.sin(0.024 * idx + 4) * 90 + 240);\r\n\r\n return `rgba(${r},${g},${b},0.4)`;\r\n }\r\n\r\n DragStart(e){\r\n var img = new Image();\r\n img.src = null;\r\n e.dataTransfer.setDragImage(img, 0, 0);\r\n\r\n var ele = e.target;\r\n var x = ele.dataset.x,\r\n y = ele.dataset.y;\r\n\r\n if(x!=null && y!=null){\r\n this.setState({dragging: true, fstart: [x,y]});\r\n }\r\n }\r\n\r\n DragOver(e){\r\n if(!this.state.dragging) return;\r\n e.preventDefault();\r\n\r\n var ele = e.target;\r\n var x = ele.dataset.x,\r\n y = ele.dataset.y;\r\n\r\n if(x!=null && y!=null){\r\n var dx = this.state.fstart[0]-x,\r\n dy = this.state.fstart[1]-y;\r\n\r\n if(Math.abs(dx)==Math.abs(dy) || dx*dy==0){\r\n this.setState({fend: [x,y], vdrag: true});\r\n }else{\r\n this.setState({fend: [x,y], vdrag: false});\r\n }\r\n }\r\n }\r\n\r\n DragDrop(e){\r\n if(!this.state.dragging) return;\r\n\r\n var tstart = [...this.state.fstart];\r\n tstart[0] = parseInt(tstart[0]);\r\n tstart[1] = parseInt(tstart[1]);\r\n\r\n var tend = [...this.state.fend];\r\n\r\n var dx = tend[0] - tstart[0],\r\n dy = tend[1] - tstart[1];\r\n\r\n if((dx*dy==0 || Math.abs(dx)==Math.abs(dy)) && (Math.abs(dx) + Math.abs(dy))>2){\r\n var tmpWord = \"\";\r\n\r\n dx = Math.sign(dx);\r\n dy = Math.sign(dy);\r\n\r\n while ((tstart[0]-dx)!=tend[0] || (tstart[1]-dy)!=tend[1]) {\r\n tmpWord += this.state.arr[tstart[0]][tstart[1]];\r\n tstart[0] += dx;\r\n tstart[1] += dy;\r\n }\r\n\r\n var tmpFound = [...this.state.found], isWord = false;\r\n\r\n for (var i = 0; i < this.state.words.length; i++) {\r\n if(this.state.words[i][0]==tmpWord){\r\n isWord = true;\r\n };\r\n }\r\n\r\n if(!isWord){\r\n this.setState({dragging: false});\r\n return;\r\n };\r\n\r\n for (var i = 0; i < tmpFound.length; i++) {\r\n if(tmpFound[i][5]==tmpWord){\r\n this.setState({dragging: false});\r\n return;\r\n };\r\n }\r\n\r\n var tmp = [...this.state.fstart];\r\n tmp.push(this.lineSize());\r\n tmp.push(this.orientation());\r\n tmp.push(this.giveColor(tmpFound.length));\r\n tmp.push(tmpWord);\r\n\r\n tmpFound.push(tmp);\r\n this.setState({dragging: false, found: tmpFound},()=>{\r\n console.log(this.state.found);\r\n });\r\n }else{\r\n this.setState({dragging: false});\r\n }\r\n\r\n\r\n e.preventDefault();\r\n }\r\n\r\n componentWillMount(){\r\n var tmp = [];\r\n for (var i = 0; i < this.state.rows; i++) {\r\n tmp.push([]);\r\n for (var j = 0; j < this.state.rows; j++) {\r\n tmp[i].push(String.fromCharCode(65+Math.floor(Math.random()*26)));\r\n // tmp[i].push('');\r\n // tmp[i].push(i+''+j);\r\n }\r\n }\r\n\r\n for (var i = 0; i < this.state.words.length; i++) {\r\n var word = this.state.words[i];\r\n\r\n for (var j = 0; j < word[0].length; j++) {\r\n tmp[word[1] + word[3]*j][word[2] + word[4]*j] = word[0][j];\r\n }\r\n }\r\n\r\n this.setState({arr: tmp});\r\n window.addEventListener('dragstart', this.DragStart.bind(this));\r\n window.addEventListener('dragover', this.DragOver.bind(this));\r\n window.addEventListener('drop', this.DragDrop.bind(this));\r\n }\r\n\r\n orientation(){\r\n // 45*(this.state.dr[0]*this.state.dr[1]==0 ? 0: 1)\r\n\r\n var dx = this.state.fstart[0]-this.state.fend[0],\r\n dy = this.state.fstart[1]-this.state.fend[1]\r\n\r\n if(dx*dy==0){\r\n if(dx==0) return 180*(dy>0)\r\n else return 90 + 180*(dx>0)\r\n }else{\r\n if(dx<0 && dy<0) return 45;\r\n else if(dx<0 && dy>0) return 135;\r\n else if(dx>0 && dy>0) return -135;\r\n else if(dx>0 && dy<0) return -45;\r\n }\r\n }\r\n\r\n lineSize(){\r\n var dx = this.state.fstart[0]-this.state.fend[0],\r\n dy = this.state.fstart[1]-this.state.fend[1]\r\n\r\n var mx = Math.max(Math.abs(dx), Math.abs(dy));\r\n return this.state.wcell*(1+mx)*(1 + 0.38*(dx*dy!=0));\r\n }\r\n\r\n render(){\r\n return(\r\n <div className=\"boxapp\">\r\n <div className=\"container\">\r\n <div className=\"progCont\" style={{\r\n width: (this.state.wcell*this.state.rows)+'px'\r\n }}>\r\n <div className=\"progressBar\" style={{\r\n width: (this.state.wcell*this.state.rows*(this.state.found.length/this.state.words.length))+'px'\r\n }}></div>\r\n </div>\r\n\r\n <div className=\"searchCont\" style={{\r\n width: (this.state.wcell*this.state.rows)+'px',\r\n display: 'grid',\r\n gridTemplateColumns: `repeat(${this.state.rows},minmax(0,1fr))`\r\n }}>\r\n {this.state.arr.map((row, x)=>{\r\n var wrow = [];\r\n for (var y = 0; y < row.length; y++) {\r\n wrow.push(\r\n <div\r\n className=\"wcell\"\r\n data-x={x} data-y={y}\r\n draggable={true} style={{\r\n width: this.state.wcell+'px',\r\n height: this.state.wcell+'px'\r\n }}>\r\n <span>{row[y]}</span>\r\n {\r\n this.state.dragging && this.state.vdrag &&\r\n (this.state.fstart[0]==x && this.state.fstart[1]==y)?(\r\n <div className=\"lineCont\" style={{\r\n width: this.state.wcell+'px',\r\n height: this.state.wcell+'px',\r\n transform: `rotateZ(${this.orientation()}deg)`\r\n }}>\r\n <div className=\"wline\" style={{\r\n width: this.lineSize()+'px',\r\n height: this.state.wcell+'px',\r\n borderRadius: this.state.wcell/2\r\n }}></div>\r\n </div>\r\n ):null\r\n }\r\n {\r\n this.state.found.map((fnd, k)=>{\r\n if(fnd[0]==x && fnd[1]==y){\r\n return (\r\n <div className=\"lineCont\" style={{\r\n width: this.state.wcell+'px',\r\n height: this.state.wcell+'px',\r\n transform: `rotateZ(${fnd[3]}deg)`\r\n }}>\r\n <div className=\"wline pline\" style={{\r\n width: fnd[2]+'px',\r\n height: this.state.wcell+'px',\r\n borderRadius: this.state.wcell/2,\r\n background: fnd[4]\r\n }}></div>\r\n </div>\r\n )\r\n }else{\r\n return null;\r\n }\r\n })\r\n }\r\n </div>\r\n )\r\n }\r\n\r\n return wrow;\r\n })}\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n }\r\n}\r\n","D:\\Code\\ReactJs\\rough\\src\\components\\infLoops\\levels.js",[],"D:\\Code\\ReactJs\\rough\\src\\components\\blockPuzzle\\allShapes.js",[],"D:\\Code\\ReactJs\\rough\\src\\components\\infLoops\\cells.js",["246"],"import React, {useState} from 'react';\r\n\r\nexport const OneCell = (props)=>{\r\n return (\r\n <svg\r\n className={\"infcell rot\"+props.rot*90}\r\n width={100}\r\n height={100}\r\n viewBox=\"0 0 100 100\"\r\n fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <g>\r\n <circle cx={50} cy={50} r={20} stroke={props.color} strokeWidth={10} />\r\n <rect x={45} width={10} height={26} fill={props.color} />\r\n </g>\r\n </svg>\r\n )\r\n}\r\n\r\nexport const TwoLcell = (props)=>{\r\n return (\r\n <svg\r\n className={\"infcell rot\"+props.rot*90}\r\n width={100} height={100}\r\n viewBox=\"0 0 100 100\"\r\n fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <g>\r\n <circle cy={0} r={50} stroke={props.color} strokeWidth={10} />\r\n </g>\r\n </svg>\r\n )\r\n}\r\n\r\nexport const TwoLineCell = (props)=>{\r\n return (\r\n <svg\r\n className={\"infcell rot\"+props.rot*90}\r\n width={100} height={100}\r\n viewBox=\"0 0 100 100\"\r\n fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <g>\r\n <rect x={45} width={10} height={100} fill={props.color}/>\r\n </g>\r\n </svg>\r\n )\r\n}\r\n\r\nexport const Threecell = (props)=>{\r\n return (\r\n <svg\r\n className={\"infcell rot\"+props.rot*90}\r\n width={100} height={100}\r\n viewBox=\"0 0 100 100\"\r\n fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <g>\r\n <circle cy={100} r={50} stroke={props.color} strokeWidth={10} />\r\n <circle cy={0} r={50} stroke={props.color} strokeWidth={10} />\r\n </g>\r\n </svg>\r\n )\r\n}\r\n\r\nexport const FourCell = (props)=>{\r\n return (\r\n <svg\r\n className={\"infcell rot\"+props.rot*90}\r\n width={100} height={100}\r\n viewBox=\"0 0 100 100\"\r\n fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <g>\r\n <circle cy={100} r={50} stroke={props.color} strokeWidth=\"10\"/>\r\n <circle r={50} stroke={props.color} strokeWidth=\"10\"/>\r\n <circle cx={100} cy={100} r={50} stroke={props.color} strokeWidth=\"10\"/>\r\n <circle cx={100} r={50} stroke={props.color} strokeWidth=\"10\"/>\r\n </g>\r\n </svg>\r\n )\r\n}\r\n","D:\\Code\\ReactJs\\rough\\src\\components\\ludo\\pieces.js",["247"],"import React, {\r\n useState\r\n} from 'react';\r\n\r\nexport const LudoPiece2 = (props) => {\r\n return (\r\n <>\r\n {props.pos==null?null:(\r\n <svg className={\"ludoPiece\"} style={{top: props.pos[0], left: props.pos[1]}} width={47} height={47} viewBox=\"0 0 500 500\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M100 338C100 260.68 162.68 198 240 198H260C337.32 198 400 260.68 400 338V338C400 415.32 337.32 478 260 478H240C162.68 478 100 415.32 100 338V338Z\" fill=\"#0A365F\" />\r\n <path d=\"M100 325C100 247.68 162.68 185 240 185H260C337.32 185 400 247.68 400 325V325C400 402.32 337.32 465 260 465H240C162.68 465 100 402.32 100 325V325Z\" fill=\"#0089ff\" />\r\n <path d=\"M150 122C150 66.7715 194.772 22 250 22V22C305.228 22 350 66.7715 350 122V122C350 177.228 305.228 222 250 222V222C194.772 222 150 177.228 150 122V122Z\" fill=\"#00b8ff\" />\r\n </svg>\r\n )}\r\n </>\r\n )\r\n}\r\n\r\nexport const LudoPiece = (props) => {\r\n return (\r\n <>\r\n {props.pos==null?null:(\r\n <svg className={\"ludoPiece\"} style={{top: props.pos[0], left: props.pos[1]}} width={47} height={47} viewBox=\"0 0 500 500\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <g clipPath=\"url(#clip0)\">\r\n <path\r\n d=\"M100 338C100 260.68 162.68 198 240 198H260C337.32 198 400 260.68 400 338C400 415.32 337.32 478 260 478H240C162.68 478 100 415.32 100 338Z\"\r\n fill=\"#041759\"\r\n />\r\n <g filter=\"url(#filter0_d)\">\r\n <path\r\n d=\"M100 325C100 247.68 162.68 185 240 185H260C337.32 185 400 247.68 400 325C400 402.32 337.32 465 260 465H240C162.68 465 100 402.32 100 325Z\"\r\n fill=\"url(#paint0_linear)\"\r\n />\r\n </g>\r\n <g filter=\"url(#filter1_d)\">\r\n <path\r\n d=\"M150 122C150 66.7715 194.772 22 250 22C305.228 22 350 66.7715 350 122C350 177.228 305.228 222 250 222C194.772 222 150 177.228 150 122Z\"\r\n fill=\"url(#paint1_linear)\"\r\n />\r\n </g>\r\n </g>\r\n <defs>\r\n <filter\r\n id=\"filter0_d\"\r\n x={86}\r\n y={181}\r\n width={328}\r\n height={308}\r\n filterUnits=\"userSpaceOnUse\"\r\n colorInterpolationFilters=\"sRGB\"\r\n >\r\n <feFlood floodOpacity={0} result=\"BackgroundImageFix\" />\r\n <feColorMatrix\r\n in=\"SourceAlpha\"\r\n type=\"matrix\"\r\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\r\n />\r\n <feOffset dy={10} />\r\n <feGaussianBlur stdDeviation={7} />\r\n <feColorMatrix\r\n type=\"matrix\"\r\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"\r\n />\r\n <feBlend\r\n mode=\"normal\"\r\n in2=\"BackgroundImageFix\"\r\n result=\"effect1_dropShadow\"\r\n />\r\n <feBlend\r\n mode=\"normal\"\r\n in=\"SourceGraphic\"\r\n in2=\"effect1_dropShadow\"\r\n result=\"shape\"\r\n />\r\n </filter>\r\n <filter\r\n id=\"filter1_d\"\r\n x={84}\r\n y={-40}\r\n width={332}\r\n height={332}\r\n filterUnits=\"userSpaceOnUse\"\r\n colorInterpolationFilters=\"sRGB\"\r\n >\r\n <feFlood floodOpacity={0} result=\"BackgroundImageFix\" />\r\n <feColorMatrix\r\n in=\"SourceAlpha\"\r\n type=\"matrix\"\r\n values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\"\r\n />\r\n <feOffset dy={4} />\r\n <feGaussianBlur stdDeviation={33} />\r\n <feColorMatrix\r\n type=\"matrix\"\r\n values=\"0 0 0 0 0.0649688 0 0 0 0 0.07287 0 0 0 0 0.2625 0 0 0 0.25 0\"\r\n />\r\n <feBlend\r\n mode=\"normal\"\r\n in2=\"BackgroundImageFix\"\r\n result=\"effect1_dropShadow\"\r\n />\r\n <feBlend\r\n mode=\"normal\"\r\n in=\"SourceGraphic\"\r\n in2=\"effect1_dropShadow\"\r\n result=\"shape\"\r\n />\r\n </filter>\r\n <linearGradient\r\n id=\"paint0_linear\"\r\n x1={363}\r\n y1={293}\r\n x2={134}\r\n y2=\"267.5\"\r\n gradientUnits=\"userSpaceOnUse\"\r\n >\r\n <stop stopColor=\"#094C89\" />\r\n <stop offset=\"0.971305\" stopColor=\"#2381D8\" />\r\n </linearGradient>\r\n <linearGradient\r\n id=\"paint1_linear\"\r\n x1=\"344.5\"\r\n y1={122}\r\n x2={146}\r\n y2={61}\r\n gradientUnits=\"userSpaceOnUse\"\r\n >\r\n <stop stopColor=\"#0A559B\" />\r\n <stop offset={1} stopColor=\"#3C9CF3\" />\r\n </linearGradient>\r\n <clipPath id=\"clip0\">\r\n <rect width={500} height={500} fill=\"white\" />\r\n </clipPath>\r\n </defs>\r\n </svg>\r\n )}\r\n </>\r\n )\r\n}\r\n","D:\\Code\\ReactJs\\rough\\src\\components\\lockpick\\spring.js",["248","249"],"import React, {\r\n useState\r\n} from 'react';\r\n\r\nexport const Spring = (props) => {\r\n var arr = [];\r\n for (var i = 0; i < 12; i++) {\r\n arr.push(i);\r\n }\r\n\r\n const f = ()=>{\r\n if(props.h%6==0) return 0.1;\r\n\r\n var d = Math.floor(props.h/3);\r\n if(d&1) return 3 - props.h%3;\r\n else return props.h%3;\r\n }\r\n\r\n var scv = `scale(1,-${f()})`;\r\n\r\n return (\r\n <div className=\"springCont\" style={{transform: scv}}>\r\n {arr.map(x=>{\r\n return <div className=\"circ\" key={x}></div>\r\n })}\r\n </div>\r\n )\r\n}\r\n\r\nexport const EmptyHolder = () => {\r\n return (\r\n <div className=\"empCont\">\r\n </div>\r\n )\r\n}\r\n\r\nexport const SpButton = () => {\r\n return (\r\n <div className=\"spbtn\">\r\n </div>\r\n )\r\n}\r\n\r\nexport const BluePin = (props) => {\r\n const f = (v) => {\r\n var d = Math.floor(v/3);\r\n if(d&1) return 3 - v%3;\r\n else return v%3;\r\n }\r\n\r\n return (\r\n <div className=\"bluepin\" style={{\r\n top: 25*(3-f(props.h))+'%',\r\n background: props.done ? '#1ae250':'#3184d2',\r\n borderColor: props.done ? '#0d9933':'#2a5dc7'\r\n }}>\r\n </div>\r\n )\r\n}\r\n","D:\\Github\\bluelab\\src\\index.js",["250"],"D:\\Github\\bluelab\\src\\App.js",[],"D:\\Github\\bluelab\\src\\reportWebVitals.js",[],["251","252"],"D:\\Github\\bluelab\\src\\components\\bezcrv\\bezcrv.js",["253","254","255","256","257","258","259"],"import React, {useState, useEffect} from 'react';\r\nimport Sketch from \"react-p5\";\r\nimport * as math from 'mathjs';\r\n\r\nimport './bezcrv.css';\r\n\r\nconst BezCrv = ()=>{\r\n const [arr, setArr] = useState([])\r\n const [idx, setIdx] = useState(-1)\r\n const [cord, setCord] = useState([])\r\n const [n, setN] = useState(4)\r\n const [drag, setDrag] = useState(true)\r\n const [showLines, setLines] = useState(true)\r\n const w = window.innerWidth\r\n const h = window.innerHeight\r\n const r = 10, offY = 0.72, spd = 250\r\n\r\n const preload = (tmp)=>{\r\n var tmp2 = []\r\n for (var i = 0; i < spd; i++) {\r\n var z\r\n if(tmp!=null){\r\n z = compute(null, i/spd, 0, tmp)\r\n }else z = compute(null, i/spd)\r\n\r\n tmp2.push(z)\r\n }\r\n\r\n setCord(tmp2)\r\n }\r\n\r\n const mouseClicked = (p5) => {\r\n var d = w, z = 0\r\n\r\n for (var i = 0; i < arr.length; i++) {\r\n var dt = math.abs(math.subtract(\r\n arr[i],\r\n math.complex(p5.mouseX, p5.mouseY)\r\n ))\r\n\r\n if(dt<d){\r\n d = dt\r\n z = i\r\n }\r\n }\r\n\r\n if(d<30){\r\n setIdx(z)\r\n }else{\r\n setIdx(-2)\r\n }\r\n }\r\n\r\n const mouseDragged = (p5) => {\r\n if(drag){\r\n if(idx+1>0){\r\n var tmp = [...arr]\r\n tmp[idx] = math.complex(p5.mouseX, p5.mouseY)\r\n setArr(tmp)\r\n }else if (idx+1==0) {\r\n mouseClicked(p5)\r\n }\r\n }\r\n }\r\n\r\n const mouseReleased = (p5) => {\r\n preload()\r\n setIdx(-1)\r\n }\r\n\r\n const setup = (p5, canvasParentRef) => {\r\n\t\tp5.createCanvas(w,h).parent(canvasParentRef)\r\n\t}\r\n\r\n const compute = (p5,t=0.5,fr=0,tmp=[...arr])=>{\r\n if(tmp.length==0) return math.complex(0,0)\r\n\r\n var lv = tmp.length,\r\n tmp2 = []\r\n for (var i = 0; i < lv-1; i++) {\r\n var z = math.subtract(tmp[i+1],tmp[i])\r\n z = math.add(tmp[i],math.multiply(z,t))\r\n tmp2.push(z)\r\n if(fr && showLines){\r\n p5.stroke(83, 84, 108)\r\n p5.strokeWeight(2)\r\n p5.line(\r\n tmp[i].re,\r\n tmp[i].im,\r\n tmp[i+1].re,\r\n tmp[i+1].im\r\n )\r\n\r\n p5.fill(83, 84, 108)\r\n p5.strokeWeight(0)\r\n p5.ellipse(z.re,z.im, r*0.6, r*0.6)\r\n }\r\n }\r\n\r\n if(tmp2.length==1){\r\n if(fr){\r\n p5.fill('#33d778')\r\n p5.strokeWeight(0)\r\n p5.ellipse(tmp2[0].re,tmp2[0].im, r*0.8, r*0.8)\r\n }\r\n return tmp2[0]\r\n }\r\n\r\n return compute(p5, t, fr, tmp2)\r\n }\r\n\r\n const osmod = (x,y)=>{\r\n var z = Math.floor(x/y), rm = x%y\r\n if(z&1) rm = y - rm\r\n\r\n return rm\r\n }\r\n\r\n const lerp = (t)=>{\r\n var col1 = [73, 240, 143],//[48, 168, 255],\r\n col2 = [5, 152, 71] //[177, 50, 232]\r\n\r\n return [\r\n col1[0]*(1-t) + t*col2[0],\r\n col1[1]*(1-t) + t*col2[1],\r\n col1[2]*(1-t) + t*col2[2]\r\n ]\r\n }\r\n\r\n\tconst draw = (p5) => {\r\n\t\tp5.background('#0e0e16')\r\n var rm = osmod(p5.frameCount,spd)\r\n\r\n var pz = compute(p5, 0, 1)\r\n document.getElementById('val').innerText = Math.round(rm*100/spd)/100\r\n for (var t = 1; t <= rm; t++) {\r\n var fr = t==rm?1:0,z\r\n if(fr) z = compute(p5, t/spd, fr)\r\n else{\r\n z = cord[t]\r\n // p5.stroke(\"#33d778\")\r\n p5.stroke(lerp(t/spd))\r\n p5.strokeWeight(4)\r\n p5.line(pz.re,pz.im,z.re,z.im)\r\n pz = math.clone(z)\r\n }\r\n }\r\n\r\n for (var i = 0; i < arr.length; i++) {\r\n p5.fill(20, 172, 254)\r\n p5.strokeWeight(0)\r\n p5.ellipse(arr[i].re,arr[i].im, r, r)\r\n }\r\n\t}\r\n\r\n const stop = ()=>setDrag(false)\r\n const start = ()=>setDrag(true)\r\n\r\n useEffect(()=>{\r\n var tmp = [],\r\n ln = 1/n,\r\n z = math.complex(w/2, h*offY),\r\n dir = math.complex(-ln*w,0),\r\n arg = 2*math.pi/n\r\n\r\n z = math.add(z, math.multiply(dir, 0.5))\r\n tmp.push(z)\r\n for (var i = 0; i < n-1; i++) {\r\n dir = math.multiply(dir, math.complex(\r\n math.cos(arg),\r\n math.sin(arg)\r\n ))\r\n\r\n z = math.add(z, dir)\r\n tmp.push(z)\r\n }\r\n\r\n setArr(tmp)\r\n preload(tmp)\r\n }, [n])\r\n\r\n\treturn (\r\n <div className=\"boxapp\">\r\n <div className=\"valbox\">t = <span id=\"val\">0</span></div>\r\n <div className=\"descrp\">\r\n A Simple Visualization of\r\n <a href=\"https://en.wikipedia.org/wiki/B%C3%A9zier_curve\" target=\"_blank\">\r\n {\" \"}Bézier Curve\r\n </a>{\" \"}using recursive approach. Drag the blue dots to change the\r\n shape of curve.<br/>\r\n Inspiration: <a href=\"https://youtu.be/aVwxzDHniEw?t=116\" target=\"_blank\">\r\n Freya Holmér\r\n </a>\r\n </div>\r\n <div className=\"controls\" onMouseOver={stop} onMouseOut={start}>\r\n <div>\r\n <label htmlFor=\"number\">N: {n}{\" \"}</label>\r\n <input name=\"number\" type=\"range\" value={n}\r\n onChange={(e)=>{ setN(e.target.value)}} min=\"2\" max=\"16\"/>\r\n </div>\r\n <div>\r\n <label htmlFor=\"showlines\">showLines: {\" \"}</label>\r\n <input name=\"showlines\" type=\"checkbox\" checked={showLines}\r\n onChange={(e)=>{ setLines(e.target.checked)}}\r\n min=\"5\" max=\"25\"/>\r\n </div>\r\n </div>\r\n <div className=\"bezbox\">\r\n <Sketch\r\n setup={setup}\r\n draw={draw}\r\n mouseDragged={mouseDragged}\r\n mouseReleased={mouseReleased}\r\n />\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default BezCrv;\r\n","D:\\Github\\bluelab\\src\\components\\invkin\\invkin.js",["260","261","262","263","264","265","266","267","268","269"],"import React, {useState, useEffect} from 'react';\r\nimport Sketch from \"react-p5\";\r\nimport * as math from 'mathjs';\r\n\r\nimport './invkin.css';\r\n\r\nconst InvKin = ()=>{\r\n const [arr, setArr] = useState([])\r\n const [final, setFinal] = useState(math.complex(0,0))\r\n const [allset, setAll] = useState(true)\r\n const [drag, setDrag] = useState(true)\r\n const [n, setN] = useState(4)\r\n const [ln, setLn] = useState(10)\r\n const w = window.innerWidth\r\n const h = window.innerHeight\r\n const r = 30\r\n\r\n const adjust = ()=>{\r\n var tmp = [...arr]\r\n var stl = ln*w/100, count = 2*10, i = n-1, d = -1\r\n\r\n while(count){\r\n if(i+1==n && d+1==0){\r\n tmp[n - 1] = math.clone(final)\r\n }else if (i==0 && d==1) {\r\n tmp[0] = math.complex(w/2, h/2)\r\n }\r\n\r\n i+=d\r\n while (i+1>0 && i<n){\r\n var dir = math.subtract(tmp[i-d],tmp[i])\r\n dir = math.divide(dir, -1*math.abs(dir))\r\n tmp[i] = math.add(tmp[i-d], math.multiply(dir,stl))\r\n i+=d\r\n }\r\n\r\n d*=-1\r\n i+=d\r\n count--\r\n }\r\n\r\n setArr(tmp)\r\n setAll(true)\r\n }\r\n\r\n const mouseDragged = (p5)=>{\r\n if(drag){\r\n setFinal(math.complex(p5.mouseX, p5.mouseY))\r\n setAll(false)\r\n }\r\n }\r\n\r\n const stop = ()=>setDrag(false)\r\n const start = ()=>setDrag(true)\r\n\r\n const setup = (p5, canvasParentRef) => {\r\n\t\tp5.createCanvas(w,h-5).parent(canvasParentRef)\r\n\t}\r\n\r\n\tconst draw = (p5) => {\r\n if(!allset && !drag) return\r\n\t\tp5.background('#0e0e16')\r\n\r\n\t\tfor (var i = 0; i < n; i++) {\r\n p5.fill('#53546c')\r\n p5.stroke('#53546c')\r\n p5.strokeWeight(0)\r\n p5.ellipse(arr[i].re,arr[i].im, r, r)\r\n if(i!=0){\r\n p5.strokeWeight(6)\r\n p5.line(\r\n arr[i-1].re,\r\n arr[i-1].im,\r\n arr[i].re,\r\n arr[i].im\r\n )\r\n }\r\n }\r\n\r\n p5.fill(51, 215, 120)\r\n p5.strokeWeight(0)\r\n p5.ellipse(final.re,final.im, r*0.6, r*0.6)\r\n p5.fill(20, 172, 254)\r\n p5.ellipse(w/2,h/2, r*0.6, r*0.6)\r\n\t}\r\n\r\n useEffect(()=>{\r\n if(!allset){\r\n adjust()\r\n }\r\n }, [allset])\r\n\r\n useEffect(()=>{\r\n var tmp = []\r\n for (var i = 0; i < n; i++) {\r\n tmp.push(math.complex((50 + i*ln)*w/100, h/2))\r\n }\r\n\r\n setArr(tmp)\r\n if(math.abs(final)==0){\r\n setFinal(math.complex(w/5, h/4))\r\n }\r\n\r\n setAll(false)\r\n }, [n, ln])\r\n\r\n\treturn (\r\n <div className=\"boxapp\">\r\n <div className=\"descrp\">\r\n An Implementation of\r\n <a href=\"http://andreasaristidou.com/FABRIK\" target=\"_blank\"> FABRIK</a>\r\n {\" \"}algorithm for the simulation of Inverse Kinemetics.\r\n Drag the green dot to interact\r\n <br/>\r\n Inpiration: <a href=\"https://youtu.be/PGk0rnyTa1U?t=177\" target=\"_blank\">\r\n Sebastian Lague\r\n </a>\r\n </div>\r\n <div className=\"controls\" onMouseOver={stop} onMouseOut={start}>\r\n <div>\r\n <label htmlFor=\"number\">N: {n}{\" \"}</label>\r\n <input name=\"number\" type=\"range\" value={n}\r\n onChange={(e)=>{ setN(e.target.value)}} min=\"2\" max=\"16\"/>\r\n </div>\r\n <div>\r\n <label htmlFor=\"number\">Length: {ln}{\" \"}</label>\r\n <input name=\"number\" type=\"range\" value={ln}\r\n onChange={(e)=>{ setLn(e.target.value)}} min=\"5\" max=\"25\"/>\r\n </div>\r\n </div>\r\n <Sketch\r\n setup={setup}\r\n draw={draw}\r\n mouseDragged={mouseDragged}\r\n />\r\n </div>\r\n )\r\n}\r\n\r\nexport default InvKin;\r\n","D:\\Github\\bluelab\\src\\components\\ropesim\\ropesim.js",["270","271","272","273","274","275","276","277","278","279","280","281"],"D:\\Github\\bluelab\\src\\components\\ropesim\\items.js",["282"],"export const Vector = {\r\n diff: (pt1, pt2)=>{\r\n return pt1.map((x,i)=> pt1[i]-pt2[i])\r\n },\r\n scale: (pt, f)=>{\r\n return pt.map(x => x*f)\r\n },\r\n add: (pt1, pt2)=>{\r\n return pt1.map((x,i)=> pt1[i]+pt2[i])\r\n },\r\n unit: (pt)=>{\r\n var f = Math.pow(pt[0]*pt[0] + pt[1]*pt[1], 0.5)\r\n return pt.map(x => x/f)\r\n },\r\n dis: (pt1, pt2)=>{\r\n var d2 = Math.pow(pt1[0]-pt2[0],2) + Math.pow(pt1[1]-pt2[1],2)\r\n return Math.pow(d2,0.5)\r\n }\r\n}\r\n\r\nexport const shuffle = (n)=>{\r\n var array = [...Array(n)].map((x,i)=> i)\r\n let currentIndex = n, randomIndex;\r\n while (currentIndex != 0) {\r\n randomIndex = Math.floor(Math.random() * currentIndex);\r\n currentIndex--;\r\n\r\n [array[currentIndex], array[randomIndex]] = [\r\n array[randomIndex], array[currentIndex]]\r\n }\r\n\r\n return array;\r\n}\r\n\r\nexport class Point{\r\n constructor(x,y,locked=false) {\r\n this.x = [x,y]\r\n this.x0 = [x,y]\r\n this.locked = locked\r\n }\r\n}\r\n\r\nexport class Stick{\r\n constructor(p_a, p_b, ln) {\r\n this.a = p_a\r\n this.b = p_b\r\n this.ln = ln\r\n }\r\n}\r\n","D:\\Github\\bluelab\\src\\components\\clothsim\\clothsim.js",["283","284","285","286","287","288","289","290","291","292","293","294","295","296"],"D:\\Github\\bluelab\\src\\components\\clothsim\\items.js",["297"],{"ruleId":"298","replacedBy":"299"},{"ruleId":"300","replacedBy":"301"},{"ruleId":"302","severity":1,"message":"303","line":1,"column":16,"nodeType":"304","messageId":"305","endLine":1,"endColumn":24},{"ruleId":"302","severity":1,"message":"306","line":1,"column":26,"nodeType":"304","messageId":"305","endLine":1,"endColumn":35},{"ruleId":"307","severity":1,"message":"308","line":81,"column":24,"nodeType":"309","messageId":"310","endLine":81,"endColumn":26},{"ruleId":"302","severity":1,"message":"311","line":123,"column":9,"nodeType":"304","messageId":"305","endLine":123,"endColumn":13},{"ruleId":"307","severity":1,"message":"308","line":135,"column":13,"nodeType":"309","messageId":"310","endLine":135,"endColumn":15},{"ruleId":"307","severity":1,"message":"308","line":137,"column":11,"nodeType":"309","messageId":"310","endLine":137,"endColumn":13},{"ruleId":"307","severity":1,"message":"308","line":162,"column":10,"nodeType":"309","messageId":"310","endLine":162,"endColumn":12},{"ruleId":"307","severity":1,"message":"312","line":168,"column":26,"nodeType":"309","messageId":"310","endLine":168,"endColumn":28},{"ruleId":"307","severity":1,"message":"308","line":194,"column":32,"nodeType":"309","messageId":"310","endLine":194,"endColumn":34},{"ruleId":"307","severity":1,"message":"308","line":196,"column":41,"nodeType":"309","messageId":"310","endLine":196,"endColumn":43},{"ruleId":"307","severity":1,"message":"308","line":224,"column":21,"nodeType":"309","messageId":"310","endLine":224,"endColumn":23},{"ruleId":"307","severity":1,"message":"308","line":250,"column":45,"nodeType":"309","messageId":"310","endLine":250,"endColumn":47},{"ruleId":"307","severity":1,"message":"308","line":257,"column":45,"nodeType":"309","messageId":"310","endLine":257,"endColumn":47},{"ruleId":"307","severity":1,"message":"308","line":264,"column":45,"nodeType":"309","messageId":"310","endLine":264,"endColumn":47},{"ruleId":"307","severity":1,"message":"308","line":271,"column":47,"nodeType":"309","messageId":"310","endLine":271,"endColumn":49},{"ruleId":"307","severity":1,"message":"308","line":278,"column":47,"nodeType":"309","messageId":"310","endLine":278,"endColumn":49},{"ruleId":"307","severity":1,"message":"308","line":294,"column":34,"nodeType":"309","messageId":"310","endLine":294,"endColumn":36},{"ruleId":"302","severity":1,"message":"303","line":1,"column":16,"nodeType":"304","messageId":"305","endLine":1,"endColumn":24},{"ruleId":"302","severity":1,"message":"306","line":1,"column":26,"nodeType":"304","messageId":"305","endLine":1,"endColumn":35},{"ruleId":"307","severity":1,"message":"308","line":24,"column":28,"nodeType":"309","messageId":"310","endLine":24,"endColumn":30},{"ruleId":"307","severity":1,"message":"308","line":28,"column":11,"nodeType":"309","messageId":"310","endLine":28,"endColumn":13},{"ruleId":"307","severity":1,"message":"308","line":58,"column":10,"nodeType":"309","messageId":"310","endLine":58,"endColumn":12},{"ruleId":"307","severity":1,"message":"308","line":59,"column":13,"nodeType":"309","messageId":"310","endLine":59,"endColumn":15},{"ruleId":"307","severity":1,"message":"308","line":60,"column":16,"nodeType":"309","messageId":"310","endLine":60,"endColumn":18},{"ruleId":"307","severity":1,"message":"308","line":61,"column":18,"nodeType":"309","messageId":"310","endLine":61,"endColumn":20},{"ruleId":"307","severity":1,"message":"308","line":65,"column":10,"nodeType":"309","messageId":"310","endLine":65,"endColumn":12},{"ruleId":"307","severity":1,"message":"308","line":67,"column":16,"nodeType":"309","messageId":"310","endLine":67,"endColumn":18},{"ruleId":"307","severity":1,"message":"308","line":72,"column":10,"nodeType":"309","messageId":"310","endLine":72,"endColumn":12},{"ruleId":"307","severity":1,"message":"308","line":74,"column":16,"nodeType":"309","messageId":"310","endLine":74,"endColumn":18},{"ruleId":"307","severity":1,"message":"308","line":79,"column":10,"nodeType":"309","messageId":"310","endLine":79,"endColumn":12},{"ruleId":"307","severity":1,"message":"308","line":80,"column":13,"nodeType":"309","messageId":"310","endLine":80,"endColumn":15},{"ruleId":"307","severity":1,"message":"308","line":81,"column":16,"nodeType":"309","messageId":"310","endLine":81,"endColumn":18},{"ruleId":"307","severity":1,"message":"308","line":82,"column":18,"nodeType":"309","messageId":"310","endLine":82,"endColumn":20},{"ruleId":"307","severity":1,"message":"308","line":92,"column":22,"nodeType":"309","messageId":"310","endLine":92,"endColumn":24},{"ruleId":"307","severity":1,"message":"308","line":93,"column":12,"nodeType":"309","messageId":"310","endLine":93,"endColumn":14},{"ruleId":"307","severity":1,"message":"308","line":94,"column":12,"nodeType":"309","messageId":"310","endLine":94,"endColumn":14},{"ruleId":"307","severity":1,"message":"308","line":95,"column":12,"nodeType":"309","messageId":"310","endLine":95,"endColumn":14},{"ruleId":"307","severity":1,"message":"308","line":96,"column":12,"nodeType":"309","messageId":"310","endLine":96,"endColumn":14},{"ruleId":"307","severity":1,"message":"308","line":99,"column":13,"nodeType":"309","messageId":"310","endLine":99,"endColumn":15},{"ruleId":"307","severity":1,"message":"308","line":103,"column":17,"nodeType":"309","messageId":"310","endLine":103,"endColumn":19},{"ruleId":"307","severity":1,"message":"308","line":104,"column":12,"nodeType":"309","messageId":"310","endLine":104,"endColumn":14},{"ruleId":"307","severity":1,"message":"308","line":105,"column":12,"nodeType":"309","messageId":"310","endLine":105,"endColumn":14},{"ruleId":"307","severity":1,"message":"308","line":106,"column":12,"nodeType":"309","messageId":"310","endLine":106,"endColumn":14},{"ruleId":"307","severity":1,"message":"308","line":107,"column":12,"nodeType":"309","messageId":"310","endLine":107,"endColumn":14},{"ruleId":"307","severity":1,"message":"308","line":110,"column":17,"nodeType":"309","messageId":"310","endLine":110,"endColumn":19},{"ruleId":"307","severity":1,"message":"308","line":111,"column":12,"nodeType":"309","messageId":"310","endLine":111,"endColumn":14},{"ruleId":"307","severity":1,"message":"308","line":112,"column":12,"nodeType":"309","messageId":"310","endLine":112,"endColumn":14},{"ruleId":"307","severity":1,"message":"308","line":113,"column":12,"nodeType":"309","messageId":"310","endLine":113,"endColumn":14},{"ruleId":"307","severity":1,"message":"308","line":114,"column":12,"nodeType":"309","messageId":"310","endLine":114,"endColumn":14},{"ruleId":"313","severity":1,"message":"314","line":130,"column":11,"nodeType":"304","messageId":"315","endLine":130,"endColumn":15},{"ruleId":"307","severity":1,"message":"312","line":91,"column":21,"nodeType":"309","messageId":"310","endLine":91,"endColumn":23},{"ruleId":"307","severity":1,"message":"312","line":98,"column":12,"nodeType":"309","messageId":"310","endLine":98,"endColumn":14},{"ruleId":"307","severity":1,"message":"308","line":116,"column":21,"nodeType":"309","messageId":"310","endLine":116,"endColumn":23},{"ruleId":"307","severity":1,"message":"312","line":137,"column":28,"nodeType":"309","messageId":"310","endLine":137,"endColumn":30},{"ruleId":"307","severity":1,"message":"308","line":141,"column":10,"nodeType":"309","messageId":"310","endLine":141,"endColumn":12},{"ruleId":"307","severity":1,"message":"308","line":149,"column":21,"nodeType":"309","messageId":"310","endLine":149,"endColumn":23},{"ruleId":"307","severity":1,"message":"308","line":164,"column":25,"nodeType":"309","messageId":"310","endLine":164,"endColumn":27},{"ruleId":"307","severity":1,"message":"308","line":165,"column":38,"nodeType":"309","messageId":"310","endLine":165,"endColumn":40},{"ruleId":"313","severity":1,"message":"316","line":172,"column":14,"nodeType":"304","messageId":"315","endLine":172,"endColumn":15},{"ruleId":"313","severity":1,"message":"317","line":173,"column":16,"nodeType":"304","messageId":"315","endLine":173,"endColumn":17},{"ruleId":"307","severity":1,"message":"308","line":174,"column":32,"nodeType":"309","messageId":"310","endLine":174,"endColumn":34},{"ruleId":"307","severity":1,"message":"312","line":174,"column":40,"nodeType":"309","messageId":"310","endLine":174,"endColumn":42},{"ruleId":"307","severity":1,"message":"312","line":174,"column":59,"nodeType":"309","messageId":"310","endLine":174,"endColumn":61},{"ruleId":"307","severity":1,"message":"312","line":191,"column":28,"nodeType":"309","messageId":"310","endLine":191,"endColumn":30},{"ruleId":"307","severity":1,"message":"308","line":202,"column":29,"nodeType":"309","messageId":"310","endLine":202,"endColumn":31},{"ruleId":"302","severity":1,"message":"318","line":267,"column":9,"nodeType":"304","messageId":"305","endLine":267,"endColumn":12},{"ruleId":"307","severity":1,"message":"308","line":280,"column":44,"nodeType":"309","messageId":"310","endLine":280,"endColumn":46},{"ruleId":"307","severity":1,"message":"308","line":289,"column":51,"nodeType":"309","messageId":"310","endLine":289,"endColumn":53},{"ruleId":"307","severity":1,"message":"308","line":312,"column":34,"nodeType":"309","messageId":"310","endLine":312,"endColumn":36},{"ruleId":"307","severity":1,"message":"308","line":316,"column":34,"nodeType":"309","messageId":"310","endLine":316,"endColumn":36},{"ruleId":"307","severity":1,"message":"308","line":323,"column":51,"nodeType":"309","messageId":"310","endLine":323,"endColumn":53},{"ruleId":"302","severity":1,"message":"319","line":9,"column":16,"nodeType":"304","messageId":"305","endLine":9,"endColumn":22},{"ruleId":"302","severity":1,"message":"320","line":13,"column":18,"nodeType":"304","messageId":"305","endLine":13,"endColumn":27},{"ruleId":"313","severity":1,"message":"316","line":45,"column":18,"nodeType":"304","messageId":"315","endLine":45,"endColumn":19},{"ruleId":"313","severity":1,"message":"316","line":57,"column":18,"nodeType":"304","messageId":"315","endLine":57,"endColumn":19},{"ruleId":"313","severity":1,"message":"317","line":59,"column":20,"nodeType":"304","messageId":"315","endLine":59,"endColumn":21},{"ruleId":"307","severity":1,"message":"308","line":60,"column":16,"nodeType":"309","messageId":"310","endLine":60,"endColumn":18},{"ruleId":"313","severity":1,"message":"317","line":64,"column":18,"nodeType":"304","messageId":"315","endLine":64,"endColumn":19},{"ruleId":"313","severity":1,"message":"321","line":65,"column":15,"nodeType":"304","messageId":"315","endLine":65,"endColumn":21},{"ruleId":"313","severity":1,"message":"316","line":66,"column":20,"nodeType":"304","messageId":"315","endLine":66,"endColumn":21},{"ruleId":"307","severity":1,"message":"308","line":67,"column":16,"nodeType":"309","messageId":"310","endLine":67,"endColumn":18},{"ruleId":"302","severity":1,"message":"322","line":97,"column":11,"nodeType":"304","messageId":"305","endLine":97,"endColumn":18},{"ruleId":"313","severity":1,"message":"316","line":103,"column":16,"nodeType":"304","messageId":"315","endLine":103,"endColumn":17},{"ruleId":"307","severity":1,"message":"312","line":110,"column":25,"nodeType":"309","messageId":"310","endLine":110,"endColumn":27},{"ruleId":"307","severity":1,"message":"312","line":110,"column":44,"nodeType":"309","messageId":"310","endLine":110,"endColumn":46},{"ruleId":"307","severity":1,"message":"308","line":112,"column":25,"nodeType":"309","messageId":"310","endLine":112,"endColumn":27},{"ruleId":"302","severity":1,"message":"322","line":139,"column":11,"nodeType":"304","messageId":"305","endLine":139,"endColumn":18},{"ruleId":"313","severity":1,"message":"316","line":145,"column":16,"nodeType":"304","messageId":"315","endLine":145,"endColumn":17},{"ruleId":"307","severity":1,"message":"312","line":156,"column":47,"nodeType":"309","messageId":"310","endLine":156,"endColumn":49},{"ruleId":"307","severity":1,"message":"312","line":156,"column":66,"nodeType":"309","messageId":"310","endLine":156,"endColumn":68},{"ruleId":"307","severity":1,"message":"308","line":162,"column":28,"nodeType":"309","messageId":"310","endLine":162,"endColumn":30},{"ruleId":"307","severity":1,"message":"308","line":177,"column":11,"nodeType":"309","messageId":"310","endLine":177,"endColumn":13},{"ruleId":"313","severity":1,"message":"316","line":206,"column":16,"nodeType":"304","messageId":"315","endLine":206,"endColumn":17},{"ruleId":"313","severity":1,"message":"317","line":208,"column":18,"nodeType":"304","messageId":"315","endLine":208,"endColumn":19},{"ruleId":"307","severity":1,"message":"308","line":209,"column":14,"nodeType":"309","messageId":"310","endLine":209,"endColumn":16},{"ruleId":"313","severity":1,"message":"317","line":213,"column":16,"nodeType":"304","messageId":"315","endLine":213,"endColumn":17},{"ruleId":"313","severity":1,"message":"321","line":214,"column":13,"nodeType":"304","messageId":"315","endLine":214,"endColumn":19},{"ruleId":"313","severity":1,"message":"316","line":215,"column":18,"nodeType":"304","messageId":"315","endLine":215,"endColumn":19},{"ruleId":"307","severity":1,"message":"308","line":216,"column":14,"nodeType":"309","messageId":"310","endLine":216,"endColumn":16},{"ruleId":"313","severity":1,"message":"316","line":274,"column":16,"nodeType":"304","messageId":"315","endLine":274,"endColumn":17},{"ruleId":"313","severity":1,"message":"317","line":276,"column":18,"nodeType":"304","messageId":"315","endLine":276,"endColumn":19},{"ruleId":"323","severity":1,"message":"324","line":289,"column":5,"nodeType":"325","endLine":289,"endColumn":13,"suggestions":"326"},{"ruleId":"323","severity":1,"message":"327","line":306,"column":5,"nodeType":"325","endLine":306,"endColumn":13,"suggestions":"328"},{"ruleId":"302","severity":1,"message":"329","line":13,"column":18,"nodeType":"304","messageId":"305","endLine":13,"endColumn":26},{"ruleId":"302","severity":1,"message":"330","line":17,"column":20,"nodeType":"304","messageId":"305","endLine":17,"endColumn":27},{"ruleId":"302","severity":1,"message":"331","line":19,"column":10,"nodeType":"304","messageId":"305","endLine":19,"endColumn":17},{"ruleId":"302","severity":1,"message":"332","line":19,"column":19,"nodeType":"304","messageId":"305","endLine":19,"endColumn":29},{"ruleId":"307","severity":1,"message":"308","line":43,"column":9,"nodeType":"309","messageId":"310","endLine":43,"endColumn":11},{"ruleId":"323","severity":1,"message":"333","line":88,"column":6,"nodeType":"325","endLine":88,"endColumn":13,"suggestions":"334"},{"ruleId":"302","severity":1,"message":"303","line":1,"column":16,"nodeType":"304","messageId":"305","endLine":1,"endColumn":24},{"ruleId":"302","severity":1,"message":"306","line":1,"column":26,"nodeType":"304","messageId":"305","endLine":1,"endColumn":35},{"ruleId":"313","severity":1,"message":"335","line":38,"column":9,"nodeType":"304","messageId":"315","endLine":38,"endColumn":12},{"ruleId":"307","severity":1,"message":"308","line":72,"column":22,"nodeType":"309","messageId":"310","endLine":72,"endColumn":24},{"ruleId":"307","severity":1,"message":"308","line":72,"column":45,"nodeType":"309","messageId":"310","endLine":72,"endColumn":47},{"ruleId":"307","severity":1,"message":"308","line":92,"column":14,"nodeType":"309","messageId":"310","endLine":92,"endColumn":16},{"ruleId":"307","severity":1,"message":"308","line":92,"column":33,"nodeType":"309","messageId":"310","endLine":92,"endColumn":35},{"ruleId":"307","severity":1,"message":"312","line":98,"column":28,"nodeType":"309","messageId":"310","endLine":98,"endColumn":30},{"ruleId":"307","severity":1,"message":"312","line":98,"column":55,"nodeType":"309","messageId":"310","endLine":98,"endColumn":57},{"ruleId":"307","severity":1,"message":"308","line":107,"column":34,"nodeType":"309","messageId":"310","endLine":107,"endColumn":36},{"ruleId":"313","severity":1,"message":"316","line":117,"column":16,"nodeType":"304","messageId":"315","endLine":117,"endColumn":17},{"ruleId":"307","severity":1,"message":"308","line":118,"column":26,"nodeType":"309","messageId":"310","endLine":118,"endColumn":28},{"ruleId":"313","severity":1,"message":"316","line":153,"column":14,"nodeType":"304","messageId":"315","endLine":153,"endColumn":15},{"ruleId":"313","severity":1,"message":"317","line":156,"column":16,"nodeType":"304","messageId":"315","endLine":156,"endColumn":17},{"ruleId":"307","severity":1,"message":"308","line":173,"column":13,"nodeType":"309","messageId":"310","endLine":173,"endColumn":15},{"ruleId":"307","severity":1,"message":"308","line":174,"column":12,"nodeType":"309","messageId":"310","endLine":174,"endColumn":14},{"ruleId":"307","severity":1,"message":"312","line":189,"column":52,"nodeType":"309","messageId":"310","endLine":189,"endColumn":54},{"ruleId":"307","severity":1,"message":"308","line":223,"column":44,"nodeType":"309","messageId":"310","endLine":223,"endColumn":46},{"ruleId":"307","severity":1,"message":"308","line":223,"column":71,"nodeType":"309","messageId":"310","endLine":223,"endColumn":73},{"ruleId":"336","severity":1,"message":"337","line":238,"column":44,"nodeType":"338","messageId":"339","endLine":257,"endColumn":24},{"ruleId":"307","severity":1,"message":"308","line":239,"column":34,"nodeType":"309","messageId":"310","endLine":239,"endColumn":36},{"ruleId":"307","severity":1,"message":"308","line":239,"column":47,"nodeType":"309","messageId":"310","endLine":239,"endColumn":49},{"ruleId":"302","severity":1,"message":"303","line":1,"column":16,"nodeType":"304","messageId":"305","endLine":1,"endColumn":24},{"ruleId":"302","severity":1,"message":"303","line":2,"column":3,"nodeType":"304","messageId":"305","endLine":2,"endColumn":11},{"ruleId":"302","severity":1,"message":"303","line":2,"column":3,"nodeType":"304","messageId":"305","endLine":2,"endColumn":11},{"ruleId":"307","severity":1,"message":"308","line":12,"column":17,"nodeType":"309","messageId":"310","endLine":12,"endColumn":19},{"ruleId":"307","severity":1,"message":"312","line":18,"column":34,"nodeType":"309","messageId":"310","endLine":18,"endColumn":36},{"ruleId":"298","replacedBy":"340"},{"ruleId":"300","replacedBy":"341"},{"ruleId":"307","severity":1,"message":"308","line":60,"column":22,"nodeType":"309","messageId":"310","endLine":60,"endColumn":24},{"ruleId":"307","severity":1,"message":"308","line":76,"column":18,"nodeType":"309","messageId":"310","endLine":76,"endColumn":20},{"ruleId":"307","severity":1,"message":"308","line":100,"column":19,"nodeType":"309","messageId":"310","endLine":100,"endColumn":21},{"ruleId":"307","severity":1,"message":"308","line":137,"column":17,"nodeType":"309","messageId":"310","endLine":137,"endColumn":19},{"ruleId":"323","severity":1,"message":"342","line":180,"column":6,"nodeType":"325","endLine":180,"endColumn":9,"suggestions":"343"},{"ruleId":"344","severity":1,"message":"345","line":187,"column":9,"nodeType":"346","messageId":"347","endLine":187,"endColumn":83,"fix":"348"},{"ruleId":"344","severity":1,"message":"345","line":191,"column":22,"nodeType":"346","messageId":"347","endLine":191,"endColumn":83,"fix":"349"},{"ruleId":"307","severity":1,"message":"308","line":23,"column":13,"nodeType":"309","messageId":"310","endLine":23,"endColumn":15},{"ruleId":"307","severity":1,"message":"308","line":23,"column":23,"nodeType":"309","messageId":"310","endLine":23,"endColumn":25},{"ruleId":"307","severity":1,"message":"308","line":25,"column":18,"nodeType":"309","messageId":"310","endLine":25,"endColumn":20},{"ruleId":"307","severity":1,"message":"308","line":25,"column":26,"nodeType":"309","messageId":"310","endLine":25,"endColumn":28},{"ruleId":"307","severity":1,"message":"312","line":69,"column":11,"nodeType":"309","messageId":"310","endLine":69,"endColumn":13},{"ruleId":"323","severity":1,"message":"350","line":91,"column":6,"nodeType":"325","endLine":91,"endColumn":14,"suggestions":"351"},{"ruleId":"307","severity":1,"message":"308","line":100,"column":23,"nodeType":"309","messageId":"310","endLine":100,"endColumn":25},{"ruleId":"323","severity":1,"message":"352","line":105,"column":6,"nodeType":"325","endLine":105,"endColumn":13,"suggestions":"353"},{"ruleId":"344","severity":1,"message":"345","line":111,"column":9,"nodeType":"346","messageId":"347","endLine":111,"endColumn":70,"fix":"354"},{"ruleId":"344","severity":1,"message":"345","line":115,"column":21,"nodeType":"346","messageId":"347","endLine":115,"endColumn":82,"fix":"355"},{"ruleId":"302","severity":1,"message":"356","line":3,"column":13,"nodeType":"304","messageId":"305","endLine":3,"endColumn":17},{"ruleId":"302","severity":1,"message":"357","line":9,"column":3,"nodeType":"304","messageId":"305","endLine":9,"endColumn":10},{"ruleId":"307","severity":1,"message":"312","line":50,"column":11,"nodeType":"309","messageId":"310","endLine":50,"endColumn":13},{"ruleId":"302","severity":1,"message":"358","line":54,"column":7,"nodeType":"304","messageId":"305","endLine":54,"endColumn":10},{"ruleId":"313","severity":1,"message":"316","line":100,"column":14,"nodeType":"304","messageId":"315","endLine":100,"endColumn":15},{"ruleId":"307","severity":1,"message":"308","line":105,"column":11,"nodeType":"309","messageId":"310","endLine":105,"endColumn":13},{"ruleId":"323","severity":1,"message":"359","line":120,"column":6,"nodeType":"325","endLine":120,"endColumn":13,"suggestions":"360"},{"ruleId":"307","severity":1,"message":"308","line":126,"column":56,"nodeType":"309","messageId":"310","endLine":126,"endColumn":58},{"ruleId":"307","severity":1,"message":"312","line":131,"column":11,"nodeType":"309","messageId":"310","endLine":131,"endColumn":13},{"ruleId":"323","severity":1,"message":"361","line":138,"column":6,"nodeType":"325","endLine":138,"endColumn":13,"suggestions":"362"},{"ruleId":"344","severity":1,"message":"345","line":144,"column":9,"nodeType":"346","messageId":"347","endLine":144,"endColumn":84,"fix":"363"},{"ruleId":"344","severity":1,"message":"345","line":148,"column":21,"nodeType":"346","messageId":"347","endLine":148,"endColumn":82,"fix":"364"},{"ruleId":"307","severity":1,"message":"312","line":24,"column":23,"nodeType":"309","messageId":"310","endLine":24,"endColumn":25},{"ruleId":"302","severity":1,"message":"356","line":3,"column":13,"nodeType":"304","messageId":"305","endLine":3,"endColumn":17},{"ruleId":"302","severity":1,"message":"357","line":9,"column":3,"nodeType":"304","messageId":"305","endLine":9,"endColumn":10},{"ruleId":"302","severity":1,"message":"365","line":15,"column":7,"nodeType":"304","messageId":"305","endLine":15,"endColumn":19},{"ruleId":"302","severity":1,"message":"358","line":46,"column":7,"nodeType":"304","messageId":"305","endLine":46,"endColumn":10},{"ruleId":"313","severity":1,"message":"317","line":61,"column":14,"nodeType":"304","messageId":"315","endLine":61,"endColumn":15},{"ruleId":"313","severity":1,"message":"316","line":96,"column":14,"nodeType":"304","messageId":"315","endLine":96,"endColumn":15},{"ruleId":"307","severity":1,"message":"308","line":118,"column":42,"nodeType":"309","messageId":"310","endLine":118,"endColumn":44},{"ruleId":"307","severity":1,"message":"308","line":118,"column":52,"nodeType":"309","messageId":"310","endLine":118,"endColumn":54},{"ruleId":"313","severity":1,"message":"316","line":122,"column":14,"nodeType":"304","messageId":"315","endLine":122,"endColumn":15},{"ruleId":"313","severity":1,"message":"317","line":123,"column":16,"nodeType":"304","messageId":"315","endLine":123,"endColumn":17},{"ruleId":"307","severity":1,"message":"308","line":127,"column":15,"nodeType":"309","messageId":"310","endLine":127,"endColumn":17},{"ruleId":"307","severity":1,"message":"308","line":131,"column":15,"nodeType":"309","messageId":"310","endLine":131,"endColumn":17},{"ruleId":"344","severity":1,"message":"345","line":146,"column":9,"nodeType":"346","messageId":"347","endLine":146,"endColumn":84,"fix":"366"},{"ruleId":"344","severity":1,"message":"345","line":150,"column":21,"nodeType":"346","messageId":"347","endLine":150,"endColumn":82,"fix":"367"},{"ruleId":"307","severity":1,"message":"312","line":38,"column":23,"nodeType":"309","messageId":"310","endLine":38,"endColumn":25},"no-native-reassign",["368"],"no-negated-in-lhs",["369"],"no-unused-vars","'useState' is defined but never used.","Identifier","unusedVar","'useEffect' is defined but never used.","eqeqeq","Expected '===' and instead saw '=='.","BinaryExpression","unexpected","'tmp2' is assigned a value but never used.","Expected '!==' and instead saw '!='.","no-redeclare","'cell' is already defined.","redeclared","'i' is already defined.","'j' is already defined.","'dim' is assigned a value but never used.","'setRow' is assigned a value but never used.","'setShcell' is assigned a value but never used.","'isFill' is already defined.","'isValid' is assigned a value but never used.","react-hooks/exhaustive-deps","React Hook useEffect has missing dependencies: 'isPlay' and 'rows'. Either include them or remove the dependency array.","ArrayExpression",["370"],"React Hook useEffect has a missing dependency: 'rows'. Either include it or remove the dependency array.",["371"],"'setCount' is assigned a value but never used.","'setPass' is assigned a value but never used.","'seconds' is assigned a value but never used.","'setSeconds' is assigned a value but never used.","React Hook useEffect has a missing dependency: 'check'. Either include it or remove the dependency array.",["372"],"'idx' is already defined.","no-loop-func","Function declared in a loop contains unsafe references to variable(s) 'y'.","ArrowFunctionExpression","unsafeRefs",["368"],["369"],"React Hook useEffect has missing dependencies: 'h', 'preload', and 'w'. Either include them or remove the dependency array.",["373"],"react/jsx-no-target-blank","Using target=\"_blank\" without rel=\"noreferrer\" is a security risk: see https://html.spec.whatwg.org/multipage/links.html#link-type-noopener","JSXOpeningElement","noTargetBlank",{"range":"374","text":"375"},{"range":"376","text":"375"},"React Hook useEffect has a missing dependency: 'adjust'. Either include it or remove the dependency array.",["377"],"React Hook useEffect has missing dependencies: 'final', 'h', and 'w'. Either include them or remove the dependency array.",["378"],{"range":"379","text":"375"},{"range":"380","text":"375"},"'math' is defined but never used.","'shuffle' is defined but never used.","'cnv' is assigned a value but never used.","React Hook useEffect has missing dependencies: 'dix' and 'points'. Either include them or remove the dependency array.",["381"],"React Hook useEffect has a missing dependency: 'final'. Either include it or remove the dependency array.",["382"],{"range":"383","text":"375"},{"range":"384","text":"375"},"'LOCKED_GREEN' is assigned a value but never used.",{"range":"385","text":"375"},{"range":"386","text":"375"},"no-global-assign","no-unsafe-negation",{"desc":"387","fix":"388"},{"desc":"389","fix":"390"},{"desc":"391","fix":"392"},{"desc":"393","fix":"394"},[4249,4249]," rel=\"noreferrer\"",[4467,4467],{"desc":"395","fix":"396"},{"desc":"397","fix":"398"},[2514,2514],[2729,2729],{"desc":"399","fix":"400"},{"desc":"401","fix":"402"},[3550,3550],[3760,3760],[3846,3846],[4066,4066],"Update the dependencies array to be: [isPlay, rows, shapes]",{"range":"403","text":"404"},"Update the dependencies array to be: [isPlay, rows]",{"range":"405","text":"406"},"Update the dependencies array to be: [check, picks]",{"range":"407","text":"408"},"Update the dependencies array to be: [h, n, preload, w]",{"range":"409","text":"410"},"Update the dependencies array to be: [adjust, allset]",{"range":"411","text":"412"},"Update the dependencies array to be: [n, ln, final, w, h]",{"range":"413","text":"414"},"Update the dependencies array to be: [dix, final, points]",{"range":"415","text":"416"},"Update the dependencies array to be: [n, ln, final]",{"range":"417","text":"418"},[7539,7547],"[isPlay, rows, shapes]",[7851,7859],"[isPlay, rows]",[1744,1751],"[check, picks]",[3987,3990],"[h, n, preload, w]",[2064,2072],"[adjust, allset]",[2331,2338],"[n, ln, final, w, h]",[2944,2951],"[dix, final, points]",[3353,3360],"[n, ln, final]"]