A multiplayer game using TCP socket programming in C/C++. Players calculate results from random number and operator cards, then bet on whether the outcome is "high" or "low." The server manages connections and game logic, while the client handles user input.
git clone https://github.com/your-username/HiLoGame.git
cd HiLoGame
make
./server
Open a new terminal and run:
./client
HiLoGame/
├── server/ # Server-side logic
│ ├── server.c
│ ├── game_logic.cpp
│ ├── game_logic.hpp
├── client/ # Client-side logic
│ ├── client.c
│ ├── client_utils.c
├── shared/ # Shared utilities and constants
│ ├── protocol.h
│ ├── common_utils.c
├── Makefile # Build automation
├── README.md # Project documentation
- Server Setup: Start the server.
- Client Interaction: Enter your name and bet (high/low).
- Game Flow:
- Players get random number and operator cards.
- Calculate the result and place bets.
- The server announces the winner.
- Fork and clone the repository.
- Create a feature branch:
git checkout -b feature-name
- Commit and push changes:
git commit -m "Add feature" git push origin feature-name
- Open a pull request.
Enjoy the Hi-Lo Equation Game! 😊