Skip to content

beyondmayOwO/tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

tic-tac-toe

Live Preview | How I worked on this project

This is a tic-tac-toe game where two players can play on the board.

How to play

  • Put the names in the input boxes
  • Click 'Start'
  • A welcome text will pop up
  • You can close it by clicking 'x'
  • You can now start marking on the board
  • Mark on the board until the result text pop ups
  • Click on 'Restart' to restart the game

What I learned

  • Using factory functions instead of object constructors

  • Wrapping the factory inside an IIFE (module pattern) For example, I put the codes inside the 'Game' module, making it little to no global code.