Class Location

java.lang.Object
  extended byLocation

public class Location
extends Object

Represents the holes on the 10 x 10 board


Field Summary
private  int col
          The column coordinate
private  int row
          The row coordinate
 
Constructor Summary
(package private) Location()
          Default constructor
(package private) Location(int r, int c)
          Creates an object with specified row and column coordinates
 
Method Summary
 int col()
           
 boolean equal(Location l)
          Tests if two objects refer to the same hole
 int row()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

row

private int row
The row coordinate


col

private int col
The column coordinate

Constructor Detail

Location

Location(int r,
         int c)
Creates an object with specified row and column coordinates

Parameters:
r - row
c - column

Location

Location()
Default constructor

Method Detail

row

public int row()
Returns:
the row coordinate

col

public int col()
Returns:
the column coordinate

equal

public boolean equal(Location l)
Tests if two objects refer to the same hole

Parameters:
l - Location to compare with
Returns:
true if this Location and l refer to the same hole