GithubHelp home page GithubHelp logo

meta-tic-tac-toe's Introduction

Author: Gregory Owen
Date: 1/3/12

These files create a game of meta tic-tac-toe.
GUI libraries used are available as stdlib.jar at http://introcs.cs.princeton.edu/java/stdlib/

Rules:

Board:
The game board consists of a three-by-three grid of tic-tac-toe boards.

Winning:
The goal of the game is to win three of the tic-tac-toe boards in the same
row, column, or diagonal - a meta tic-tac-toe. Each individual tic-tac-toe
board is won by the usual rules of tic-tac-toe.

Play:
On the first move, a player may place a mark in any of the available slots. 
After the first move, however, players may only make marks in the
tic-tac-toe board whose position in the game board is the same as the
position in the smaller tic-tac-toe board of the previous player's mark.
For example, if the first player were to play in the top left corner of the
center tic-tac-toe board, the second player would have to place his or her
next mark in one of the slots of the top left tic-tac-toe board.
Note that it is perfectly legal (and, in some cases, a good strategy) to
send your opponent to a tic-tac-toe board that has already been won.


UPDATE 1/8/12:

Fixed bug that would stall game:
It is possible for a player to be legally directed to play in a grid that is already full. The first player may play in any grid, leaving 8 open slots in that grid however, there are always 9 slots on the board that will direct a player to play in a given grid. This means that it is always possible for a player to be directed to a full grid.
The game previously did not take this into account, and would not let the player play anywhere, stalling the game indefinitely. Under the new rules, any player directed to a full grid will have their pick of the whole board. This may be too powerful, so another fix may be necessary.

meta-tic-tac-toe's People

Contributors

gregowen avatar

Stargazers

 avatar

Watchers

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