Advertisement
Guest User

Untitled

a guest
Nov 12th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. function letsHide(cible){
  2. //----------------------------------------------------------- VAR
  3. var cells = getAccecibleCellsBy(cible);debug(cells);
  4. var myCells = getAccecibleCellsBy(getLeek());debug(myCells);
  5. var weightZero = [];
  6. var weightOne = [];
  7. var weightTwo = [];
  8. //----------------------------------------------------------- COND
  9. for(var cell in cells){
  10. for(var myCell in myCells){
  11. if (isOnSameLine(cell, myCell) and lineOfSight(cell, myCell)){
  12. insert(weightTwo, myCell, 0);
  13. }
  14. else if(lineOfSight(cell, myCell) and !isOnSameLine(cell, myCell)){
  15. insert(weightOne, myCell, 0);
  16. }
  17. else {
  18. insert(weightZero, myCell, 0);
  19. }
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement