Skip to content
Justin Cotarla edited this page Sep 24, 2019 · 1 revision

X-Rudder-AI

Lucidchart Diagram

Requirements

X-Rudder is a 2-player adversary game played with 30 square tokens (15/per color) on 12x10 (12 (width) x 10(height)) board that is initially empty. The board is numbered 1 to 10 from bottom to top, and A to M from left to right.

For the sake of this project, the two colors tokens will be represented by ■ and the token of the other color by □. Each token can be put a tile of the board.

Initially each player is given his/her 15 tokens. And each player tried to build an “X” of 5 similar tokens.

Each player take turn placing his/her tokens on the board or moving them (up, down, left, right, and diagonal). As soon as one player is able set an X with his 5 five tokens and avoided a strikethrough X he /she becomes a winner only if he/she completed the X and the opponent did not strikethrough his/her X., that is, the opponent puts his/her two token on the left and right to the center of the central token of the X.

Entities

  • Player
    • Handles input
    • Validates input syntax
    • Exposed interface which will be implemented by HumanPlayer and AIPlayer
    • Keep track of moves (31st turn would be invalid turn)
  • Board
    • Data structure
    • Display
    • Game logic (who’s winning) based on a position
      • Determines if someone has completed an X
      • See if anyone has made a strike through
  • Game
    • Who’s turn is it
    • Tell Board to print after move
    • Tell Players to receive input
    • Handles starting and ending game
Clone this wiki locally