Ejemplo n.º 1
0
        private static bool SetWL()
        {
            var winnerLine = Tool.GetSameLine(board);

            if (winnerLine != null)
            {
                winner = winnerLine[0].player;

                if (winner == Players.O)
                {
                    loser = Players.X;
                }
                else if (winner == Players.X)
                {
                    loser = Players.O;
                }
                return(true);
            }
            else
            {
                winner = Players.NULL;
                loser  = Players.NULL;
            }
            return(false);
        }
Ejemplo n.º 2
0
 protected static bool IsSameLineExist(nBoard board)
 {
     if (Tool.GetSameLine(board) == null)
     {
         return(false);
     }
     else
     {
         return(true);
     }
 }