Method | Output | Input | Sample |
Lumberjack.init | None | HEIGHT WIDTH TIME DENSITY |
IN : 50 50 500 0.15 |
Lumberjack.look | 0 DIRDIR is E, N, W, or S. The number 0 tells the visualizer that you are performing a look, not a move. |
LEFT RIGHTWhere LEFT would be element 0 of the Lumberjack.look return, and RIGHT would be element 1. In the event that LEFT or RIGHT would have 0 characters, they are changed from "" to "^" |
OUT: 0 E IN : ^ YYNNNNYYYNNN |
Lumberjack.move | 1 MOVESMOVES is a sequence of E, N, W, and S. The number 1 tells the visualizer that you are performing a move. |
X YThe X and Y coordinates that you end up at. |
OUT: 1 EEESSS IN : 3 3 |
look(dir) print("0 "+dir) ret[0] = nextString() ret[1] = nextString() return ret move(moves) print("1 "+moves) ret[0] = nextInt() ret[1] = nextInt() return ret main() height = nextInt() width = nextInt() time = nextInt() density = nextDouble() //YOUR CODE STARTS HERE
-height <height> | Specify height |
-width <width> | Specify width |
-time <time> | Specify time |
-M <M> | Specify M |
-P <P> | Specify P |
-density <density> | Specify density |
-q <q> | Specify q |
-q0 <q0> | Specify q0 |
-s <seed> | Specify the initial seed |
-t <speed> | Specify the initial speed |
-exec <command> | Specify the command to execute your code |
-novis | Run the test case without the visualizer (requires -exec, implies -go) |
-go | Start running immediately (requires -exec) |
-drop | Tell the visualizer to drop frames if it can't keep up |
-showall | Show all the individual moves, even ones that are concatenated together in a single call to move |