public long hash() {
return hash.get();
}
private void genHash() {
hash = new Zobrist();
for (int row = 0; row < Boards.HEIGHT; row++) {
for (int col = 0; col < Boards.WIDTH; col++) {
BoardPiece piece = get(row, col);
hash.update(type, (piece != null ? piece.getTeam() : null),
col, row, (piece != null ? piece.getType() : null));