//--- enquiries // get game result for board and its current player (as set) // interpret result kind Count internal ResultKinds CheckGameResult(GoalDef goal, BoardModel board, bool phase2) { var result = _gamecode.CheckCondition(goal, board, phase2); return(result); }
// check goal conditions for current player to see if game has ended and how internal ResultKinds CheckCondition(GoalDef goal, BoardModel board, bool phase2) { return(goal.Code.Exec(board, phase2) ? goal.Kind : ResultKinds.None); }