()
| 687 | } |
| 688 | |
| 689 | private int heuristic() { |
| 690 | return playerPieces.get(playerToMove).stream().mapToInt(piece -> approxValue.get(piece.pieceType)).sum() |
| 691 | - playerPieces.get(Color.opponent(playerToMove)).stream().mapToInt(piece -> approxValue.get(piece.pieceType)).sum(); |
| 692 | } |
| 693 | |
| 694 | public boolean isDraw() { |
| 695 | if (isThreeFoldRepetition || fiftyMoveDraw) { |
no test coverage detected