GithubHelp home page GithubHelp logo

tictactoe's Introduction

Dhyaan Shah

Compile and Run TicTacToe.c file

To play against the computer, press 1 (Computer always being O)
To play the two player mode, press 2 (wherein player 1 has the choice to select either X or O and player 2 will get the other accordingly)
Press 3 to exit

To place an X/O on the grid, enter the coordinates (space seperated)

| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | 9 |

Assuming player will only play in an empty space Program will throw a warning if player tries to play in a filled space

Single player
Player has an option to go either first or second against the computer

Computer Move priority:
Computer will try to win if possible (Two O already alligned)
If not possible then computer will try to block player from winning if possible (Two X already alligned)
Otherwise, computer will play randomly in any empty space
Note: Computer is not completely optimal, but it will try to win or block player from winning whenever possible

If there is no winner till all the spaces are filled on the grid,
then the game is tied

tictactoe's People

Contributors

dds08 avatar dhruvin255 avatar 3point1four avatar

Watchers

 avatar

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.