Assignment 8 – GO: the game
1 Design, Build and Test

Assignment 8 – GO: the game

.

Due Tuesday 11/19 11:59pm

1 Design, Build and Test

Implement an administrator for a GO game. While so far GO boards had size 19x19, the administrator should manage games that are played on a 9x9 board. If you have designed the other components of the game appropriately this change should amount to modifying a single constant definition. If not, first refactor your components so that there is a single point of control for the size of the board, run the tests for all the components to make sure the refactoring doesn’t change the behavior of your components, adjust the size of the board, test all the components again using appropriate tests for the new board size, and then desing and build the administrator.

The administrator should wait for connections from a remote player and then administer a game between the remote player and a defaul local player. After the game is complete the administrator should write the names of the winning players to STDOUT as an array of JSON strings. If the remote player drops the connection during the game, the default player wins. Similarly if the remote player transmits invalid values to the administrator.

The administrator should retrieve its IP and port, and the relative path of the implementation of the default player from a configuration file “go.config” that contains a JSON object of the form: {"IP" : s, "port" : n, "default-player" : s} where n is a number and s strings. The administrator should load dynamically the default player using the path provided in the configuration file.

To achieve the above you may have to adjust the interface of your referee component from assignment 6 or other components you designed in previous asssignments. That said, you should not modify the communication message format and protocol for player components from assignment 7. As before, note any changes you make to existing parts of ypur code base so that we can discuss them during code walks.In contrast to the unit and integration testing of previous assignments, this assignment introduces the idea of system testing. That is testing the game system as an integrated complete composition of different components.

There is a simple yet effective way to test your game administrator and the game as a whole; random testing. For that you will need to create players with a randon strategy. Some of the random players should only perfom legal random moves while others should perform both legal and illegal random moves, transmit invalid values or drop the connection. Then you should play a large number of games.

Deliverables: In your team’s GitHub dev repository, create a directory "Deliverables/8/8.1/" and deposit there a Makefile for launching the the game administrator with a specific default player. We will use it to play a number of games with our own remote players. You can assume our players will send valid JSON to the admin but you should not make any further assumptions about the shape or order of those messages.