Tic-Tac-Toe!

How to Play

  • Two players take turns selecting a box
  • The starting player is randomly selected
  • First player to have three in a row (vertically, horizontally, or diagonally) win!
  • If all boxes are filled and there is no winner, the result is a draw. Hit reset and play again!

Languages, Methods, and Skills Implemented

  • Vanilla HTML, CSS, JavaScript
  • Conditional Logic and Functions
  • Utilized flexbox and understanding of CSS Box Model to create game structure and implement responsive design
  • Event Listeners/Handlers, forEach and for-in iteration through arrays and sets
  • Sets, set value comparison, and iteration through sets were used to evaluate player combinations against a set of sets including possible winning combinations

Deployed Game