tictactoe
Class Gomoku

java.lang.Object
  |
  +--java.util.Observable
        |
        +--tictactoe.AbstractBoardGame
              |
              +--tictactoe.Gomoku

public class Gomoku
extends AbstractBoardGame

Class to enforce rules of Gomoku.

Version:
2.0 1999-03-26
Author:
Oscar.Nierstrasz@acm.org

Fields inherited from class tictactoe.AbstractBoardGame
_cols, _gameState, _nobody, _player, _rows, _squaresLeft, _turn, _winner, _winningScore
 
Constructor Summary
Gomoku(Player playerX, Player playerO)
          Gomoku is similar to TicTacToe, except it is played on a 19x19 Go board, and the winner must get 5 in a row.
Gomoku(Player playerX, Player playerO, int cols, int rows)
          Gomoku can also be played on a board of different dimensions.
 
Methods inherited from class tictactoe.AbstractBoardGame
addObserver, assert, checkWinner, cols, currentPlayer, get, init, initFailed, inRange, move, notOver, player, rows, set, setWinner, squaresLeft, swapTurn, test, toString, winner
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Gomoku

public Gomoku(Player playerX,
              Player playerO)
Gomoku is similar to TicTacToe, except it is played on a 19x19 Go board, and the winner must get 5 in a row.

Gomoku

public Gomoku(Player playerX,
              Player playerO,
              int cols,
              int rows)
Gomoku can also be played on a board of different dimensions. Obviously cols and rows should be greater than 5 and less than 19.