import GameState; /** * RulesImp class * * This is a stub class to test and implement the Rules interface. * * @author Alex Ford, Johnathan Emmons, Rob Park, Arrel Gray * @version 1.0 of March 2000 * */ public class RulesStub implements OthelloRules { // +--------+--------------------------------------------------- // | Fields | // +--------+ /** The number of players */ int numPlayers; /** The current player */ int player; // +---------+-------------------------------------------------- // | Methods | // +---------+ /** initialize the board with the beginning piece arrangement */ public GameState startingPieces(GameState g) { return g; }// startingPieces /** return the number of players for the current game */ public int numberPlayers(GameState g) { return numPlayers; }//numberPlayers /** determines whether the attempted move is legal */ public boolean legalMove(Gamestate g, int player, int row, int column) { return true; }//legalMove /** determines if there is any legal move available */ public boolean anyMove(Gamestate g, int player) { return true; }//anyMove /** returns a list of all available moves for a given player */ public int[] allMoves(GameState g, int player) { int[] moves[0]; retirn moves[]; }//allMoves /** determines a winner if there is one */ public int endOfGame(GameState g, int player) { return -1; }//endOfGame // +------------+------------------------------------------------ // | Extractors | // +------------+ /** extract the currnet player */ public int getPlayer() { return this.player; }//getPlayer }//class RulesStub