public BoardScorer(DoktorChessAIBoard toScore, pieceColour newViewpoint, scoreModifiers newModifiers) { modifiers = newModifiers; viewpoint = newViewpoint; List<square> myPieces = toScore.getPiecesForColour(viewpoint); List<square> enemyPieces = toScore.getPiecesForColour(viewpoint == pieceColour.black ? pieceColour.white : pieceColour.black); parentBoard = toScore; if (viewpoint == pieceColour.black) { _myMaterialAdvantage = toScore.blackMaterialAdvantage; _myMaterialDisadvantage = toScore.whiteMaterialAdvantage; } else if (viewpoint == pieceColour.white) { _myMaterialAdvantage = toScore.whiteMaterialAdvantage; _myMaterialDisadvantage = toScore.blackMaterialAdvantage; } _status = toScore.getGameStatus(myPieces, enemyPieces); }