DEV Community

zivoxcrooc
zivoxcrooc

Posted on

tic tak toe as a project in a course

Image descriptionthis small code is a task that i had to do for a course that i am taking, it is the first time that i have made a funcional game, i saw it from a youtube tutorial but it has helped me to continue advancing in my course and understand the lenguage more.

Description of the code: in this code, the board has been written,some global variables such a current player, winner and running game, then we have printed each part of the board assingning it a value to later be able to change the appearance of the board by a strikethrough or a cicle, they were created entry declarations to win horizontally, vertically and diagonally, tie declarations were also considereted and when winning and a text is printed as the case may be, in addition to a declaration to change the player and to be able to play with the machine.
this is the link to the site in github for check the code https://github.com/zivoxcrooc/ticktactoe

Top comments (0)

An Animated Guide to Node.js Event Loop

>> Check out this classic DEV post <<