Skip to content

lablnet/TicTacToe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

A Tic Tac Toe game using Minimax algorithm

Purpose

To understand how things works underneath the hood.

Todo

  • initialize the project.
  • Add js and scss using webpack.
  • Game win, lose and tie state.
  • Add minimax algorithm.
  • Splash screen
  • Support for n*n board
  • Multiplayer support
  • Different levels
  • Add sound/beeps

Install

  • First clone the repo git clone https://github.com/Lablnet/TicTacToe
  • Now run npm install to install dependencies
  • Now build npm run build or watch if you making changes npm run watch

File Structure

  • src/js/
    • Board.js Contain code to generate dynamic board.
    • Screen.js Code for screens like splash, game board and game over.
    • Play.js Code to play game detect user clicks mark on board, logic for game over and who win.
    • AI.js Computer turn move using minmax.
    • App.js Usage of above classes and import SCSS Style-sheet.
  • src/scss/
    • App.scss Style-sheet file
  • index.html Base HTML file.
  • public/build.jsJavaScript build file

Contributions

There is still a lot of work to do, so feel free to contribute to open PR

License

MIT

Support

Donate coffee?
here is the bitcoin address
Balance

37x6PA4qtPu2fQnYdW5U7jztYhbchASpBV

Thanks you so much.