Methods Summary |
---|
public synchronized void | add(borland.samples.apps.chess.client.board.Boardsquares b)
int column,row;
for (column=0;column<8;column++){
for (row=0;row<8;row++) {
board[column][row] = board [column][row] +
b.board[column][row];
}
}
|
public synchronized void | assign(int column, int row, int value)
board[column][row] = value;
|
public boolean | equals(borland.samples.apps.chess.client.board.Boardsquares b)
int column,row;
for (column=0;column<8;column++) {
for (row=0;row<8;row++) {
if (board[column][row] != b.board [column][row])
return false;
}
}
return true;
|
public synchronized void | init(borland.samples.apps.chess.client.board.Boardsquares b)
for (int column=0;column<8;column++) {
for (int row=0;row<8;row++) {
board[column][row] = b.board[column][row];
}
}
|
public int | nonZeroElementCount()
int count = 0;
for (int column=0;column<8;column++) {
for (int row=0;row<8;row++) {
if (board[column][row] != 0)
count++;
}
}
return count;
|
public synchronized void | subtract(borland.samples.apps.chess.client.board.Boardsquares b)
int column,row;
for (column=0;column<8;column++) {
for (row=0;row<8;row++) {
board[column][row] = board[column][row] -
b.board[column][row];
}
}
|
public synchronized int | value(int file, int rank)
if (file < 0 || rank < 0 || file > 7 || rank > 7)
return 0 ;
else
return board[file][rank];
|