Skip to content

Hermione69/tic-tac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic-Tac-Toe

Simple tic-tac-toe game built using HTML, CSS, and JavaScript.

Introduction

What is tic-tac-toe also known as?

  • Tic-tac-toe, also called noughts and crosses and many other names, is a paper and pencil game between two players, O and X, who alternate in marking the spaces in a 3×3 board. A player wins by getting three of their own marks in a horizontal, vertical or diagonal row.

What is the aim of tic-tac-toe?

  • Tic Tac Toe is traditionally played on a 3 × 3 grid. Players take turns placing a mark in one of the cells of the grid. The goal of the game is for players to position their marks so that they make a continuous line of three cells vertically, horizontally, or diagonally.

Rules

  • Two players take turns: placing 'X' and 'O' marks in empty spaces on a 3x3 square grid.
  • Player with the 'X' mark starts first. The first player to place 3 marks in a vertical, horizontal, or diagonal row wins the game.
  • If all spaces are filled, the game ends in a draw.

Live demo 👋