Skip to content

KojinKuro/tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe

Description

This is a very basic implementation of Tic Tac Toe on a website. It currently has the capability of playing Tic Tac Toe against a local opponent. Some fun things that have been added like a crown around the winner and score tracking. This big focus I had while doing this project was using as few global variables as possible. This was done using the module pattern and factories. There are future features that are still to be added in the future, but is considered MVP complete.

How to Use

Live Demo

git clone [email protected]:KojinKuro/tic-tac-toe.git
cd tic-tac-toe
open index.html

Preview

Demo image

Features

  • Play tic tac toe
  • Can change your symbol
  • Keeps track of your score
  • Will scale to different screen sizes

Context

This project took around 25 hours to complete.

Learning Takeaways

While working on this project, I tried to use a few global variables as possible. I did this using factories and module patterns. Something that I focused on was keeping the code clean and refactoring as I went on for readability. As the code got larger, it became more important that code was well thought out. Some of the things I feel proud about doing in the project was following the git workflow, writing better commits, and experimenting more with CSS.

To-do

JAVASCRIPT

  • Make it so you cannot have the same symbol as another player
  • Add AI to the game
    • Random input AI
    • Advanced AI based on some kind of online code

HTML

  • Sound on and off button
    • Save and load the whether or not the user muted the program
  • Player vs Player or Player vs Computer selection

Credits

  • Code done by Charles Kwang
  • Sound files sourced from mixkit