The board consists of a grid of 1616 squares.Simple wooden pawn-style playing pieces, often called “Halma pawns.”.Note: we only consider the two-player variant here this game can also be played by four players but we will not explore this here. In more details (from ): Setup for two players See for more about this rule modification. Here, to prevent spoiling, we modify the goal of the game to be to occupy all of the opponent’s starting positions which the opponent is not still occupying. Note that the spoiling player cannot win either (because some pieces remain in their original corner and thus cannot be used to occupy all positions in the opposite corner). Note that this original rule of the game is subject to spoiling, as a player may choose to not move some pieces at all, thereby preventing the opponent from occupying those locations. To win the game, a player needs to transfer all of their pieces from their starting corner to the opposite corner, into the positions that were initially occupied by the opponent. Each player starts with 19 game pieces clustered in diagonally opposite corners of the board. The game uses a 16x16 checkered gameboard. In this project, we will play the game of Halma, an adversarial game with some similarities to checkers. Please test your program with the provided sample files to avoid any problem. Anything you write to stdout or stderr will be ignored and is ok to leave in the code you submit (but it will likely slow you down). Note that if your code does not compile, or somehow fails to load and parse input.txt, or writes an incorrectly formatted output.txt, or no output.txt at all, or OuTpUt.TxT, you will get zero points. End-of-line character is LF (since vocareum is a Unix system and follows the Unix convention). Format for input.txt and output.txt is specified below. It should write a file “output.txt” with your solution to the same current directory. It should read a text file called “input.txt” in the current directory that contains a problem definition. Your code will be tested as follows: Your program should not require any command-line argument. You may use any of the programming languages provided by. You should upload and test your code on, and you will submit it there. The output format is simple and examples are provided. Failure to do so will most certainly cost some points. script, your output should match the specified format exactly. Since each homework is checked via an automated A.I. ![]() ![]() You are encouraged to try your own test cases to check how your program would behave in some complex special case that you might think of. There will be more complex test cases and it is your task to make sure that your program will work correctly on any valid input. The samples are very simple and it should not be assumed that if your program works on the samples it will work on all test cases. Please understand that the goal of the samples is to check that you can correctly parse the problem definitions and generate a correctly formatted output. You will be provided sample inputs and outputs (see below).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |