Skip to content

Project: Tic Tac Toe. A game you can play in your browser. Part of The Odin Project - Full stack Javascript course.

Notifications You must be signed in to change notification settings

curveservices/tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project: Tic Tac Toe

Live Demo 👉 A game of tic tac toe

PC View 👇

Screenshot 2023-04-07 at 13 16 10

Overview

Project Tic Tac Toe has been set as part of The Odin project. Create a game of tic tac toe whilst ensuring to use as little global code as possible, by tucking everthing away inside of a module or factory. Skills learnt from the prevoiuse lesson Factory Functions & The Module Pattern.

Assets

Objective

  1. Create a browser based game of Tic Tac Toe
  2. The main goal is to use as little global cosed as possible. Try tucking everything away inside of a module or factory.
  3. Set up your HTML and write a JavaScript function that will render the contents of the gameboard array to the webpage (for now you can just manually fill in the array with "X"s and "O"s.
  4. Build the functions that allow players to add marks to a specific spot on the board, and then tie it to the DOM, letting players click on the gameboard to place their marker.
  5. Build the logic that checks for when the game is over! Should check for 3-in-a-row and a tie.
  6. Clean up the interface to allow players to put in their names, include a button to start/restart the game and add a display element that congratulates the winning player!

Extra Credit

  • Create an AI so that a player can play against the computer! Start by just getting the computer to make a random legal move.
  • Work on making the computer smart. It is possible to create an unbeatable AI using the minimax algorithm

Languages & Tools

javascript HTML5 CSS3

Rozla-Dev 31-03-2023

Back to top 👆

About

Project: Tic Tac Toe. A game you can play in your browser. Part of The Odin Project - Full stack Javascript course.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published