User interface:
- Representation of the game board has to be clickable graphics
Game play:
- Person-2-person mode supports communication of two instances of the program over the Web
- Person-2-computer mode: human player against computer AI, which can be loaded by selecting it from a list of avaiable AIs from a drop-down menu.
- Computer-2-computer mode
Game rule variants:
- Regular connect 5: each player takes turn placing a piece on the game board, alternating between black and white pieces. Who connects 5 pieces in a line (horizontal, vertical, or diagonal) first wins.
- Memory Connect 5: each piece will disappear after a prespecified length of time (eg. 2 secs). Placing pieces on an existing piece may cause a penalty (eg. lose a turn)
- Japanese rule: if the first player makes a double-3, double-4, or longer-than-5 move, then s/he loses.
- Speed: each move has to be played within a prespecified length of time, and when the player does not play a piece before time is up, s/he loses the turn
The 2 most challenging implementations are the networking package and the clickable GUI. If we break down this project into components, these two can be developed and tested quite independently:
- Networking: use the console as output, send information between two instances of the program. The game board can be printed to the console each time a move is played. No rule-checking required.
- GUI: create a game board with 19 x 19 lines. Every intersection of these lines can be clicked on, and a round piece will appear on the intersection clicked.
Other components of this project include: game control and game rules.
- Game control: the game can be played by either a human player or an AI agent. Use polymorphism (interface) here.
- Game rules: the game can have many different rules, not even limited to Connect 5. For example, Go can be played with just a change of game rule. Use polymorphism here again.
And somewhere down the road, AI agents can actually be created. But this is still a distant aspiration, and should not be attempted until the above infrastructure is in place.
Traditional Gomoku