Files
Visualizer.jar
TilesMatchingVis
To use the visualizer for testing your solution locally, you'll have to adopt your solution to read
the parameters from standard in and write the output to standard out.
This doesn't affect the functioning of the solution you submit to our server.
Your program should first read
the number of colors and shapes N,
the size of the board S and
the maximal possible value of the counter of the discarded tiles D
(in order, each number in a separate line).
After this, you should repeatedly read the tile you'll have to place tile,
output the string representing your move and flush standard out.
To do this, you should implement the following pseudocode:
N = int(readLine())
S = int(readLine())
D = int(readLine())
init(N, S, D)
while (true)
tile = readLine()
printLine(placeTile(tile))
flush(stdout)
To run the visualizer with your solution, you should run:
java -jar Visualizer.jar -exec "<command>" -seed <seed>
Here, <command> is the command to execute your program,
and <seed> is seed for test case generation.
Additionally you can use the following options:
-
-novis to turn off the visualization.
-
-delay <ms> to set the delay between visualizing moves, in milliseconds.
-
-manual to play the game yourself. Click on a highlighted cell of the board to place the tile,
on "Discard" to discard the tile or on "Score" to end the game.
Finally, you can print any debug information of your solution to standard error,
and it will be forwarded to the standard out of the visualizer.