-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update README.md for 0.3.0
- Loading branch information
Showing
1 changed file
with
33 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,51 @@ | ||
# TicTacToe game | ||
TicTacToe game with AI written in C (terminal interactive interface). | ||
|
||
**Only Linux** is currently supported as target platform. | ||
**Only Linux** is currently supported as main platform, but there is CMakeLists.txt, which can be useful to compile project on Windows. | ||
|
||
## How to start game | ||
### Method 1 - Use already compiled executable | ||
1. Download latest release in Releases section on GitHub. | ||
2. Extract downloaded archive. | ||
3. Run executable file: | ||
``` | ||
./ttt | ||
``` | ||
Download latest release, extract archive and run already compiled executable file. | ||
|
||
### Method 2 - Download sources and build | ||
1. Install requirements for build | ||
``` | ||
### Method 2 - Download sources and compile yourself | ||
Install requirements for build (apt as example) | ||
```bash | ||
sudo apt update && sudo apt install -y git make gcc libncurses-dev | ||
``` | ||
2. Clone repo: | ||
``` | ||
git clone https://github.com/BrinzaBezrukoff/tictactoe.git | ||
``` | ||
3. Navigate inside repository directory: | ||
``` | ||
cd tictactoe | ||
``` | ||
4. Build with GNU Make and GCC | ||
Clone repo and navigate inside directory | ||
```bash | ||
git clone https://github.com/brinza888/tictactoe.git && cd tictactoe | ||
``` | ||
Build with GNU Make and GCC | ||
```bash | ||
make | ||
``` | ||
5. Run executable file | ||
``` | ||
./ttt | ||
Run executable file | ||
```bash | ||
./bin/ttt | ||
``` | ||
#### Some extra make options | ||
1. For systems with gnome-terminal installed there is option to run game in separated window: | ||
Also you can simply install tictactoe to /usr/bin location (by default), using `install` target | ||
```bash | ||
make install | ||
``` | ||
make window | ||
``` | ||
2. Build and run in one line: | ||
|
||
### Method 3 - Docker (self-hosted OpenSSH server) | ||
This asuume you have Docker installed. | ||
|
||
Clone repo and navigate inside directory | ||
```bash | ||
git clone https://github.com/brinza888/tictactoe.git && cd tictactoe | ||
``` | ||
make run | ||
Build Docker image | ||
```bash | ||
docker build -t tictactoe -f docker/Dockerfile . | ||
``` | ||
3. Clean everything related to build | ||
Run in background | ||
```bash | ||
docker run -d -v tictactoe:/etc/ssh/keys -p 9999:22 tictactoe | ||
``` | ||
make clean | ||
Now connect using user `ttt` (without password) | ||
```bash | ||
ssh -p 9999 ttt@localhost | ||
``` | ||
|
||
## Gameplay | ||
AI is playing as zero, human is playing as cross and always starts. | ||
|
||
1. Choose level mode for AI **using arrow buttons** (this feature in develoment, modes are not balanced). | ||
|
||
![image](https://user-images.githubusercontent.com/29017599/145648147-60493a5a-9297-4e91-ace0-eb3952e61be4.png) | ||
|
||
2. When it is your time to make turn, **use arrow buttons** to navigate on map. Selection is marked with yellow crosses. Press enter to place Cross in selected cell. | ||
|
||
![image](https://user-images.githubusercontent.com/29017599/145648244-b8f91880-a3f5-43aa-b557-976020f0186a.png) | ||
|
||
![image](https://user-images.githubusercontent.com/29017599/145648543-74bd5d3f-54bd-48d5-829e-c30a338879bf.png) | ||
|
||
This method can be used wherever you are since after deployment on server you will be need only SSH client on machine you want! |