42 lines
703 B
Java
42 lines
703 B
Java
package reversi.model;
|
|
|
|
/**
|
|
* Class for a reversi field.
|
|
*/
|
|
public class Field {
|
|
|
|
/**
|
|
* <code>Row</code> of the field.
|
|
*/
|
|
private int row;
|
|
|
|
/**
|
|
* <code>Column</code> of the field.
|
|
*/
|
|
private int col;
|
|
|
|
/**
|
|
* Constructs a new field.
|
|
*
|
|
* @param row row of the field
|
|
* @param col column of the field
|
|
*/
|
|
public Field(final int row, final int col) {
|
|
this.row = row;
|
|
this.col = col;
|
|
}
|
|
/**
|
|
*
|
|
* @return The row of the field.
|
|
*/
|
|
public final int row() {
|
|
return row;
|
|
}
|
|
/**
|
|
*
|
|
* @return the column of the field.
|
|
*/
|
|
public final int col() {
|
|
return col;
|
|
}
|
|
} |