Exemplo n.º 1
0
        public Game StatusLong()
        {
            Game game = new Game();

            game.Board     = BoggleBoard.ToString();
            game.TimeLimit = TimeLimit;

            game.Player1 = Player1.ActiveLongUser();
            game.Player2 = Player2.ActiveLongUser();

            int left = (int)(StartTime.AddSeconds((double)TimeLimit) - DateTime.Now).TotalSeconds;

            if (GameState == "completed" || left <= 0)
            {
                TimeLeft     = 0;
                GameState    = "completed";
                game.Player1 = Player1.CompletedLongUser();
                game.Player2 = Player2.CompletedLongUser();
            }
            else
            {
                TimeLeft = left;
            }

            game.TimeLeft  = TimeLeft;
            game.GameState = GameState;
            return(game);
        }
Exemplo n.º 2
0
 public Game()
 {
     BoggleBoard = new BoggleBoard();
     Board       = BoggleBoard.ToString();
 }