Crates.io | tic_tac_toe_rust |
lib.rs | tic_tac_toe_rust |
version | 0.4.0 |
source | src |
created_at | 2023-03-30 17:58:55.25342 |
updated_at | 2023-04-11 08:36:30.901201 |
description | A simple tic tac toe game with a minimax ai |
homepage | |
repository | https://github.com/jungersa/tic_tac_toe_rust |
max_upload_size | |
id | 825330 |
size | 87,690 |
A command-line tic-tac-toe game written in Rust, with a computer player that uses the minimax algorithm. This project was created to learn Rust and how to implement a functional AI for a game.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
To install the game, you will need to have cargo installed, as well as the Rust toolchain. You can install the Rust toolchain by following this guide.
To install the game, simply run the following command in your terminal:
$ cargo install tic_tac_toe_rust
To start a new game, run the following command:
$ tic_tac_toe_rust
To make a move, simply enter the row and column numbers of the cell you want to place your symbol in.
To run the automated tests for this system, run the following command:
$ cargo test
The end-to-end tests ensure that the game is functional, including proper player moves and win/loss/draw conditions. It also tests all the functions in the game module. And every traits implemented on every structs.
To test the coding style, run the following command:
$ cargo fmt --all -- --check
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
If you encounter any issues while using the game, please open an issue on the GitHub repository. And if you have any questions, feel free to contact me on my github account. If you would like to contribute to the project, please read the CONTRIBUTING.md file.
Future releases may another way to play the game (e.g. a GUI).
We use SemVer for versioning. For the versions available, see the tags on this repository.
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details