Coder Social home page Coder Social logo

tic-tac-toe's Introduction

Simple Tic-Tac-Toe Game

This is a basic web-based tic-tac-toe game that allows two players to play tic-tac-toe on a single device. It's built using HTML, CSS, and JavaScript.

Features

  • 3x3 game grid
  • Two player gameplay (X and O)
  • Restart game functionality
  • Responsive design for desktops

Getting Started

Prerequisites

You will need a modern web browser to run this game. Recommended browsers include:

  • Google Chrome
  • Mozilla Firefox
  • Safari
  • Microsoft Edge

Running the Game

To run the game, simply clone this repository or download the files to your local machine. Open the index.html file in your preferred web browser to start playing.

File Structure

  • index.html - The main HTML document containing the structure of the game.
  • styles.css - Contains all the styling for the game.
  • script.js - Contains all the logic required to handle game operations.

How to Play

  1. The game starts with player X's turn.
  2. Click on any empty cell to make a move.
  3. Play alternates between X and O.
  4. The first player to align three of their marks (X or O) vertically, horizontally, or diagonally wins.
  5. Click the "Restart Game" button to clear the board and start a new game.

Contributing

Feel free to fork this repository and submit pull requests. You can also open issues if you find any bugs or have feature suggestions.

License

This project is free to use and does not currently have a specific license.

Notes

I'm making an update on my iPad.

tic-tac-toe's People

Watchers

Dan Huynh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.