A fully commented Tic-Tac-Toe example written in Rust
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Converted test-input folder into actual tests Mar 29, 2018
.gitignore Completed project Mar 26, 2018
.travis.yml Added travis configuration Mar 29, 2018
Cargo.lock Completed project Mar 26, 2018
Cargo.toml Completed project Mar 26, 2018
LICENSE Completed project Mar 26, 2018
README.md Added gif of the running program Mar 29, 2018
tic-tac-toe.gif Added gif of the running program Mar 29, 2018

README.md

tic-tac-toe

A fully commented Tic-Tac-Toe example written in the Rust Programming Language. The comments explain some of the syntax and describe a lot of the decisions that went into creating the program. For a more complete introduction to the language, see the Getting Help section below.

The code is intentionally kept very simple. You do not need to learn or use absolutely every feature of Rust in order to productively write software using it.

Start reading from either src/main.rs or src/game.rs.

This project was originally created for a talk: "An Introduction to Rust"

The Game

Tic-Tac-Toe is played on a 3x3 grid. You take turns placing pieces and attempt to get three in a row horizontally, vertically, or diagonally.

Here's what it looks like when it is running:

tic-tac-toe game

Build Instructions

  1. Install Rust
  2. Download or clone the code.
  3. Run the command cargo run from the project directory

Getting Help

To start learning the Rust programming language, check out the excellent Rust book.

The quickest way to get your questions answered is to visit The Rust Programming Language Forum. People there are very helpful and kind. They will help you figure out whatever you are having trouble with.

Contributing

How to Contribute to Open Source

If you find a typo or want to improve any of the descriptions, please feel free to make any modifications and then open a pull request. A great way to help out is to clarify anything that I forgot to explain.

Instead of making many unrelated changes in one big pull request, it is often easier to get several smaller, more focused pull requests reviewed and merged quickly.