Skip to content

Imfae/Tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic-tac-toe

UPDATE:

A computer player is added and replaces one of the player in the previous version of the game.

The computer player uses the minimax algorithm to choose the best move and implements alpha-beta pruning to decrease call stack and runtime.


This is a command line version of Tic-tac-toe that can be played between two human players named Cross (X) and Nought (O).

To mark a desired square, player must input the number representing the square in the console when prompted. FAILURE to enter a number between 1 and 9 would result in a repeat prompt.

The squares are marked as follows:

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

Play the game live here: Replit.

About

A Console-level Tic-tac-toe

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages