Beispiel #1
0
        //--- 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);
        }
Beispiel #2
0
 // 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);
 }