/TicTacToe

Primary LanguageJavaScript

TicTacToe

This project challenged me to combine my programming skills in JavaScript with my skills in HTML and CSS, to build a game with an interactable user interface.

Tools Used:

  • HTML, CSS & JavaScript
  • VS code

Pseudocode: thought process

  1. 3x3 grid box with CSS grid: made use of empty divs and added a pointer cursor with css
  2. Add interactivity with JS event listeners: make it clickable, and change colors. Also make it let the player know who's next to play.
  3. Show who won: use knowledge of algorithms to find all possible ways to win and implement if with if statements.
  4. Use an "if" statement to make the boxs unclickable after each click.

Acknowledgement

  • I'll like to thank my classmates, Josh and Mustapha, for always pointing me in the right direction.