Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lukasondrejka/cpp-tic-tac-toe

Tic-Tac-Toe game in C++ with client-server TCP communication
https://github.com/lukasondrejka/cpp-tic-tac-toe

client-server console cpp game linux socket tcp

Last synced: about 2 months ago
JSON representation

Tic-Tac-Toe game in C++ with client-server TCP communication

Awesome Lists containing this project

README

        

# Tic Tac Toe

This is a simple Tic Tac Toe game implemented in C++
with using client-server architecture and sockets for communication.

## Setup

Linux is required to build and run the project (tested on Ubuntu).

1. Build the project with `make`

```bash
make
```

2. Run the server

```bash
./app s
```

3. Run the client (in another terminal)

```bash
./app c
```

4. Play the game

Inputs are in the format of `rowcol` where `row` and `col` are integers between 1 and 3.
For example, to place a mark in first row and third column, you should enter `13`.
After each move, the board will be printed to the console.
Game ends when one of the players wins or the board is full.