7.8.0.1

6 — The Ref & the Players

Due Thursday, 24 October 2019, midnight

Delivery Place the product of this week’s project steps into your repo as follows:

Design Task 5 — Observing Players observes the need for observers, and by now, you have implemented a player observer. The paying Tsuro.com audience will also want to watch individual games from the referee’s and the administrator’s points of view.

Design the interfaces of tournament-level and game-level observers.

Describe which existing interfaces you must modify, and how, to accommodate these observers.

Two pages should suffice. Less is more.

Programming Task Co-design implementations for the following components:

When a player requests the placement of a tile during its turn, the requested placement must not conflict with the given information and the rule checker must bless the tile placement as legal.

If a player’s tile placement causes
  • the player’s exit from the board and if the player is forced to commit suicide because all new edges force it out, the player gets removed as if it had exited the board through the action of some other player and the chosen tile gets placed.

  • any avatar to go into an infinite loop and if the player is forced to construct such a loop, then the referee deals with this situation exactly like a suicide through board exit, except that no tile gets placed.

Describe the complete player interface in a file called a player-interface.PP. Use a proper combination of your programming language and English.

Testing Task Develop a test harness for the rule checker’s capability of evaluating the legality of a turn.

An input is the same as in 5 — Observing Players.

The outputs are "legal" and "cheating"; each action demands one output.

Create five tests and place them in rules-tests.