-


> > > > Programming Assignments > Assignment 7 - Fission

Objectives

Assignment

Implement Fission with the following modifications.

The input interface for the game should be the same as for Checkers. Red moves first. Moves are specified by the coordinates of the stone to move and the coordinates of the empty space to move it to (so the space beyond must either contain another stone or be off the board). If the game ends in a draw then the final line of output should be "Draw". In the (impossible?) case that a player cannot move on their turn then the other player wins.

Along with a text display of the current state at the beginning of the game and after each legal move in the same format as for Checkers (with B now representing blue stones instead of black checkers and lower case letters for light stones), your program should produce an HTML file called fission_output.html so that the final state of the game can be rendered in a web browser. The dimensions of the canvas element should be 20 pixels per row and column and the form of output should be as given in the example HTML file. The smaller circles represent the light stones. Ideally, your code would produce exactly the same HTML file as the given one for the corresponding final state (the script in the sample file draws the squares for the board top-to-bottom, left-to-right and then the pieces, also top-to-bottom and left-to-right). If there is a problem writing the file then your program should fail gracefully.

You must submit a makefile that creates an executable called Fission.

Grading will be based on correctness and design, with a large part of the grade for design determined by the extent of changes to the code you submitted for Checkers (preferably only small changes to main) and by the amount of code in new classes. Some part of the grade for design will be determined by a judgement of how easily your implementation could be modified to play with other new kinds of pieces (ideally, only new code in a new class and a modification of the setup code would be required; the code for regular and light pieces should not need to be modified if we were to introduce yet another kind of piece).

We also reserve the right to deduct points from submissions for violations of the following guidelines.

Files and Submissions

Submit everything you need in order to build Fission.


Valid HTML 4.01 Transitional