524 |
|
} |
525 |
|
|
526 |
|
public static boolean inBounds(int row, int col) { |
527 |
< |
return (0 <= row) && (row < RANKS) && (0 <= col) && (col < RANKS); |
527 |
> |
return (0 <= row) && (row < RANKS) && (0 <= col) && (col < RANKS); |
528 |
|
} |
529 |
|
|
530 |
|
// The representation |
551 |
|
long getGreen() { return green_; } |
552 |
|
|
553 |
|
public Player occupant(int row, int col) { |
554 |
< |
if ((0 <= row) && (row < RANKS) && (0 <= col) && (col < RANKS)) { |
554 |
> |
if ((0 <= row) && (row < RANKS) && (0 <= col) && (col < RANKS)) { |
555 |
|
long m = 1L << (row + col * RANKS); |
556 |
|
if ((blue_ & m) != 0L) return Player.Blue; |
557 |
|
else if ((green_ &m) != 0L) return Player.Green; |