Git Product home page Git Product logo

tic-tac-toe's Introduction

Tic-Tac-Toe game

Overview

  • This is a two player game, board size can be 3 x 3, 5 x 5, 7 x 7 or 9 x 9.
  • The game includes two modes, AI player on or off.
  • AI player off: when the game starts, players alternate clicking on available spots to claim them with symbol "X" or "O". If one player wins or the board contains no more available spots, a message would pop up for user to play again or exit the game. The "play again" action would clear the board and restart the game. The "exit the game" action would redirect the page.
  • Ai player on: Human player is "X", AI player is "O". User selects the spot first for the first round then switch players after each round.

Link to live game

Instructions

  1. Select your player mode, play with AI or play it by yourself.
  2. Select your preferred board size. The corresponding board would appear once you've selected it.
  3. To win the game, player needs to get n X's or n O's in a row, either vertically, horizontally, or diagonally for n x n board size.
  4. Switch turns between two Players after each round.

Features

  • Counting scores for each player.
  • Flexible board size according to player's selection.
  • Options to replay the game or close the window via pop up message.
  • Random colour display for each spot in the board.

Libraries used

  • jQuery

Wishlist

  • AI player mode with different difficulty levels.
  • Make game rules harder (i.e., to win the game, players need to get n X's or O's in a row on a m x m board).

tic-tac-toe's People

Contributors

liaa2 avatar

Watchers

 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.