public final class Position extends Object
| Constructor and Description |
|---|
Position(int row,
int col) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
static Position |
fromIndex(int index,
int columns) |
int |
getCol() |
int |
getRow() |
int |
hashCode() |
boolean |
isMovableFrom(Position otherPosition) |
boolean |
isVisibleFrom(Position otherPosition) |
int |
toIndex(int columns) |
String |
toString() |
Position |
withCol(int col) |
Position |
withRow(int row) |
@ConstructorProperties(value={"row","col"}) public Position(int row, int col)
public static Position fromIndex(int index, int columns)
public int toIndex(int columns)
public boolean isVisibleFrom(Position otherPosition)
public boolean isMovableFrom(Position otherPosition)
public int getRow()
public int getCol()
public Position withRow(int row)
public Position withCol(int col)
Copyright © 2017. All rights reserved.