https://github.com/zain-ul-din/final-oop-project-cplus
BSCS 2nd Semester project
https://github.com/zain-ul-din/final-oop-project-cplus
collaborate cpp final-oop-project game game-using-oop oop-project open-source tic-tac-toe tictactoe
Last synced: 5 months ago
JSON representation
BSCS 2nd Semester project
- Host: GitHub
- URL: https://github.com/zain-ul-din/final-oop-project-cplus
- Owner: Zain-ul-din
- Created: 2021-06-03T07:00:04.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-01-29T12:28:37.000Z (over 1 year ago)
- Last Synced: 2025-05-05T09:08:55.356Z (5 months ago)
- Topics: collaborate, cpp, final-oop-project, game, game-using-oop, oop-project, open-source, tic-tac-toe, tictactoe
- Language: C++
- Homepage:
- Size: 838 KB
- Stars: 20
- Watchers: 1
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Demo

---
- š Hi, Iām Zain-ul-din
- Rank : " Student "> I like my code to be elegant and efficient. The logic should be straightforward to make it hard for bugs to hide, the dependencies minimal to
> ease maintenance, error handling completeaccording to an articulated strategy, and performance close tooptimal so as not to temptpeople to
> make the code messy with unprincipled optimizations. Clean code does one thing well.# USAGE
> Clone Repo and compile `index.cpp`# DOCS
# Tic Tac Toc Game in C++
> A Tic Tac Toc game implemented in C++. This game uses the ```C++11``` standard.
### Requirements
This game requires a ```C++11``` compliant compiler. You can check if your compiler supports ```C++11``` by checking if ```__cplusplus``` is defined as ```201103L``` or greater.
### Included Libraries
- `````` for standard input and output.
- `````` for standard string operations.
- `````` for dynamic arrays.
- `````` for the standard algorithm library.
- `````` for math functions.
- ``` for Windows API functions such as keyboard button clicks.
- ``` for the getch() function to get a character from the keyboard.
- `````` for C++11 multi-threading and thread sleep.
- `````` for C++ system time.
- `````` for C++11 functions.# Classes
- ```Event:``` a custom event handler class that triggers an action when something happens and can have multiple subscribers
- ```InputManager:``` a class that manages input from the user
- ```GameRenderer:``` a class that renders the game map, player UI, etc.
- ```GameManager:``` a class that manages the game state and logic### Macros
- ```DEFAULT_BOX:``` the character to use for an empty box in the game map
- ```PLAYER1_BOX:``` the character to use for player 1's box in the game map
- ```PLAYER2_BOX:``` the character to use for player 2's box in the game map
- ```CURSOR:``` the character to use for the cursor in the game map
- ```_CH_:``` a macro for calling the getch() function
- ```CLS:``` a macro for calling the clearScreen() function### Enums
- ```PlayerTurn:``` an enum to represent the current player's turn
### Usage
To use this game, compile and run the code using a C++11 compliant compiler. The game will display the game map and allow the user to move the cursor and fill boxes using the keyboard. The game ends when a player wins or it ends in a draw.
I hope this helps! Let me know if you have any other questions.