/treehouse-project-4

Treehouse Full-Stack JS Developer program: example of project after Unit 4

Primary LanguageJavaScriptMIT LicenseMIT

Tic-Tac-Toe

Awesome Game Logo

Welcome to my version of the tic-tac-toe game, developed for the training program Treehouse FSJS.

My version is quite a bit different from the expected. As usually the main difference is in layout - I used completely original marking and styles. To stylize the game I used the most modern techniques of CSS, such as CSS Grid Layout.

The one can play a game alone against the computer, or in a pair. For each player you can specify a name, choose one of four colors. And also playing against the computer the player can choose his starting figure. If no settings are specified before game start, the game will start with the default settings.

Also a player can choose the size of the field - 3 by 3, 4 by 4 or 5 by 5. For more information about the logic of the game, see comments in script files. To write scripts I used ES6 and Babel. The transcoded version of the script is connected to the index.html file. However, if you run the game in a modern browser, you can run non-transcoded scripts which you will find in src/... path.

After round is over, the winner's name appears on the top. After 3 seconds, the playing board would be cleared and a new round will begin.

The game has a menu. In order to open it you need to pull the marker on the left side of the screen (or on the top in case of a small screen). In menu you can choose to clear the game statistics and start from the first round with a 0-0 score.

Have a nice game!

To run the project one can start index.html file in its browser or use the following commands:

    npm install
    npm start

I hope you will enjoy it. Max Eremin