The TateDrez (from Spanish, Tatetí - tic-tac-toe - and ajedrez - chess) is a game that combines tic-tac-toe with chess. he game unfolds on a 3 × 3 chessboard, featuring a set of white pieces - bishop, rook, and knight - and their black counterparts. Players, denoted as Player 1 and Player 2, alternate turns, with Player 1 utilizing the white pieces and Player 2 employing the black pieces.
The board starts empty, and initially, players take turns placing each of their pieces on the board in an empty square. Player 1 places their first piece in an empty square, then Player 2 places their first piece in an empty square, then Player 1 places another of their pieces in an empty square, and so on. After all 6 pieces are placed on the board, the actual game begins.
Player 1, taking the first turn, selects a piece and executes a move akin to chess rules. The rook traverses vertically or horizontally without constraint, the bishop moves diagonally without limitations, and the knight follows an "L" pattern, involving one square horizontally or vertically followed by an additional diagonal move. Moves must adhere to the conditions that the final square be within the board and unoccupied.Unlike chess, it is not possible to capture the opponent's pieces here.
After a player's move, it's the other player's turn, who chooses a piece and makes a move.
The game ends when either one of the players wins or a draw occurs.
A player secures victory, reminiscent of tic-tac-toe, by aligning 3 of their pieces in a row, column, or diagonal.
A draw occurs if a player exhausts all possible moves or after 30 rounds elapse without a decisive winner.
- May 20th, 2023: Initiation of the project development.
- June 27th, 2023: Successful completion of the project.
- Feburary 3rd, 2024: Project translated and documented in English.
The code presented in this repository was delivered as a project in the 'Introduction to Computer Programming' course within the Applied and Computer Mathematics bachelor's degree @ ICMC-USP.