Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. Func Fill($x, $y)
  2. Local $Temp[2]
  3. Local $RetTemp
  4.  
  5. $Temp[0] = $x&"|"&$y
  6.  
  7. while $Temp[0] <> ""
  8. $RetTemp = _ArrayPop($Temp)
  9.  
  10. MsgBox("","",$RetTemp)
  11.  
  12. $Spl = StringSplit($RetTemp,"|")
  13.  
  14. _ArrayDisplay($Spl)
  15.  
  16. if CheckInBounds($Spl[1],$Spl[2]) then
  17. $TempArray[$Spl[1]][$Spl[2]] = 0
  18.  
  19. _ArrayAdd($Temp,$Spl[1]+1&"|"&$Spl[2])
  20. _ArrayAdd($Temp,$Spl[1]&"|"&$Spl[2]+1)
  21. _ArrayAdd($Temp,$Spl[1]-1&"|"&$Spl[2])
  22. _ArrayAdd($Temp,$Spl[1]&"|"&$Spl[2]-1)
  23. _ArrayDisplay($Temp)
  24. Endif
  25. WEnd
  26.  
  27. MsgBox("","","")
  28.  
  29. return;
  30. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement