Project Report .here.
UML Design .here
This project is an implementation of a variant of the classic board game Othello. The game is developed using object-oriented programming principles, with a focus on flexibility and extensibility. The game supports various starting positions, unplayable squares, and includes functionality for saving and loading game states.
- Customizable Starting Positions: Players can choose from different starting configurations for the game.
- Unplayable Squares: Certain squares on the board are unplayable, adding a new strategic element to the game.
- ASCII-Based Board Display: The game board is displayed using ASCII characters, making it easy to run in any console or terminal.
- Save/Load Functionality: Players can save their current game state to a file and load it later to continue playing.
- Object-Oriented Design: The game is built using a modular, object-oriented approach, making it easy to understand and extend.
The project is organized into several classes, each responsible for a specific part of the game's functionality:
- Piece: Represents the individual pieces on the board (white, black, or empty).
- Board: Manages the game board, including initialization, move validation, and display.
- Player: Handles player attributes such as name and assigned symbol (white or black).
- Game: Controls the game flow, including player turns, command input, and game state management.
- Position: Represents a board position, with methods to determine if a move is valid.
- UnplayablePosition: A subclass of Position that represents squares where pieces cannot be placed.
Ensure you have a C++ compiler installed on your system. Compile the source files using your preferred compiler.
When the game starts, you will be presented with a menu with the following options:
- Quit
- Load a Game
- Start a New Game
Follow the on-screen instructions to play the game. Players take turns entering coordinates to place their pieces on the board. The game will handle:
- Turn management
- Move validation
- Display of the current state of the board after each move
You can save the current game state at any time and load it later to continue from where you left off.
- Graphical User Interface (GUI): Implementing a GUI would enhance the user experience by providing a visual representation of the board and pieces.
- Networked Multiplayer: Allowing players to compete over a network would add a new dimension to the game.
- AI Opponent: Adding an AI opponent would enable single-player mode against the computer.
This project is licensed under the MIT License. Feel free to use, modify, and distribute this software.