p2.tictactoe
Class Runner

java.lang.Object
  extended by p2.tictactoe.Runner

public class Runner
extends java.lang.Object

Helper class to find winning scores for BoardGame.

Version:
$Version$
Author:
$Author: oscar $

Constructor Summary
Runner(BoardGame game, int col, int row)
          This class does not have any interesting contracts.
 
Method Summary
 int run(int dcol, int drow)
          A Runner runs in some direction (dcol,drow) as far as it can, as long as the pieces on the Board are the same as the home square.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Runner

public Runner(BoardGame game,
              int col,
              int row)
This class does not have any interesting contracts. We do not bother to define a separate test() method, since it will be thoroughly tested by the unit tests for the BoardGame implementations.

Method Detail

run

public int run(int dcol,
               int drow)
A Runner runs in some direction (dcol,drow) as far as it can, as long as the pieces on the Board are the same as the home square. Then it runs in the opposite direction, and returns the total score.