Giter Site home page Giter Site logo

slidingtictactoe's Introduction

SlidingTicTacToe

travis Code Coverage

Game rules

Sliding Tic Tac Toe (STTT from now on) is a two-player game and it is played on a board that consists of X vertical lines and X horizontal lines that form X*X intersections that serve as the Field of the game.

Board

One player controls red pieces and the other player black pieces. The aim of the game is to form a line of three pieces of one's own color either horizontally, vertically or diagonally on the Field.

In the beginning, all the pieces are on the sides of the field. For each line of the field, there are two pieces: one black on one side and one red on the other side. The beginning positions of the pieces are called Bases. The pieces on the vertical lines are called Vertical Pieces and the pieces on the horizontal lines are called Horizontal Pieces. They have different properties that will be explained later. Each player has the same amount of pieces (2*X) and also the same amount of Horizontal and Vertical Pieces as the other player. The colors alternate on the sides so that every other piece on one side is red and every other black.

Setup

The players take turns moving one piece of their own color at a time. A piece can be moved according to the following rules:

  • Horizontal Pieces can move horizontally on their own line, but not past another Horizontal Piece on the same line. They can stop on an empty intersection or on an empty Base.

  • Correspondingly, Vertical Pieces can move vertically on their own line, but not past another Vertical Piece on the same line. They can stop on an empty intersection or on an emtpy Base.

  • IF THERE ARE THREE PIECES OF A CERTAIN COLOR ON THE FIELD, MORE PIECES OF THAT COLOR CAN NOT BE MOVED INTO THE FIELD.

The first player to get three pieces in a row on the Field wins.

slidingtictactoe's People

Contributors

valhekouneli 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.