Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function letsHide(cible){
- //----------------------------------------------------------- VAR
- var cells = getAccecibleCellsBy(cible);debug(cells);
- var myCells = getAccecibleCellsBy(getLeek());debug(myCells);
- var weightZero = [];
- var weightOne = [];
- var weightTwo = [];
- //----------------------------------------------------------- COND
- for(var cell in cells){
- for(var myCell in myCells){
- if (isOnSameLine(cell, myCell) and lineOfSight(cell, myCell)){
- insert(weightTwo, myCell, 0);
- }
- else if(lineOfSight(cell, myCell) and !isOnSameLine(cell, myCell)){
- insert(weightOne, myCell, 0);
- }
- else {
- insert(weightZero, myCell, 0);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement