In order to use the offline tester / visualizer tool for testing your solution locally, you'll have to modify your solution
by adding the main method that interacts with the tester / visualizer via reading data from standard input and
writing data to standard output. As long as you do not change the implementation of the methods initialize and move, this
doesn't affect the way your solution works when submitted to our server.
Here are example solutions for different languages, modified to be executed with visualizer. They all implement the same approach: send the knights in from top left corner, lead them closer to center of the dungeon and then move them in random direction as a single group.
To run the tester with your solution, you should run:
java -jar Tester.jar -exec "<command>" -seed <seed>
Here, <command> is the command to execute your program,
and <seed> is seed for test case generation.
If your compiled solution is an executable file, the command
will be the full path to it, for example, "C:\TopCoder\solution.exe" or
"~/topcoder/solution". In case your compiled solution is to be run
with the help of an interpreter, for example, if you program in Java,
the command will be something like "java -cp C:\TopCoder Solution".
Additionally you can use the following options:
Finally, you can print any debug information of your solution to standard error,
and it will be forwarded to the standard out of the tester.
-vis : Turns on visualization. Cell color indicates the parties which are present in the room at the end of the turn: blue for knights, gold for princesses, black for monsters, gold with blue border for knights escorting princesses.
-delay <delay> : Sets the delay (in milliseconds) between visualizing consecutive simulation steps. The default value is 100.
-debug : Outputs visualizer debug information.
-size <SZ> : Sets size of the dungeon room for visualization.
-timelimit <TL> : Sets time limit enforced on your solution, in seconds. Default is 20.