Giter Club home page Giter Club logo

tictactoe-c's Introduction

TicTacToe

Current version: 1.7.0

A simple implementation of immortal game, where two players, X and O, take turns marking the spaces in a 3ร—3 grid. The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row wins the game.

Fore(after)word:

Tic Tac Toe might seem redundant to implement. However, there is some theory to it that makes it an interesting (yet simple) game - this project uses
MinMax with AlphaBeta pruning to make sure that AI stays top notch. Unfortunately, on my machine (Intel i5-4670k) it takes way too long for AI to play on 6x6 board.
That is my next focus - making AI scalable for any (within realms of possibility) board size. If (for whatever reason) you are interested in history of this project, old README files have some of that.

Installation

To install Tic Tac Toe, just run make in TicTacToe/src . Then, all you need to do is to type "./Tic-Tac-Toe" into your terminal. :)

Contributing

If you want to contribute to the project by creating translation file (or improving the code), feel free to do so.
All you need to do is follow the convention of .lang files - each line has its corresponding index in the string table, so it should be pretty straight forward to create your own translation.

Starting parameters

TL;DR:

-l / --language -set language to the corresponding .LANGUAGE.lang . (default: en-gb)

--p1_name -set player 1 name. (default: Player 1)

--p2_name -see p1_name. (default: Player 2)

--AI_name -see p1_name. (default: AI)

-s / --b_size - set board size to corresponding integer (default: 3)

--p1_sign -set player 1 sign. (default: X)

--p2_sign -see p1_sign. (default: O)

--ff_sign -Stands for 'free field sign'. see p1_sign. (default: #)

--ai_vs_ai -Let AI play versus itself when AI is chosen in menu. (default: 0)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.