This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package require http | |
package require base64 | |
package require xml | |
# Change these to point to your admin section | |
set host "localhost" | |
set port "8080" | |
set username "admin" | |
set password "hackme" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fd(canvas, pos_x, pos_y, units, dir) | |
units.times do | |
pos_y = if dir == "N" || dir == "NE" || dir == "NW" | |
pos_y - 1 | |
elsif dir == "S" || dir == "SE" || dir == "SW" | |
pos_y + 1 | |
else | |
pos_y | |
end | |
pos_x = if dir == "E" || dir == "NE" || dir == "SE" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fd(canvas, pos_x, pos_y, units, dir) | |
units.times do | |
pos_y = if dir == "N" || dir == "NE" || dir == "NW" | |
pos_y - 1 | |
elsif dir == "S" || dir == "SE" || dir == "SW" | |
pos_y + 1 | |
else | |
pos_y | |
end | |
pos_x = if dir == "E" || dir == "NE" || dir == "SE" |