Skip to content

This is a implementation for the x&0 game in c++

Notifications You must be signed in to change notification settings

blk14/tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

x-0-game

This is an implementation for the x&0 game in c++. For playing it you have to choose if you want to start, then to insert the coordinates for "x" (by default you play with x and computer with "0"). The implementation tries to win or to be very hard to be beaten. For it there is a check function which decide if the game is end. "Check" function checks each posibility for 3 elements to be in row or if the matrix is full, in this cases results that the game is finished. The function "fill" is the function which decide where to put elements for the computer and decide it based on the information given by the "danger" function which return the coordinates where is a posibility to end the game (where there are 2 elements in a row and the player wait for the third). If there is not this danger the "fill" function tries to create a posibility like that and decide to put elements where is a perspective to put 3 in a row, if it is not possible too, then it put the element where is possible.

About

This is a implementation for the x&0 game in c++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages