Ejemplo n.º 1
0
        public void CanGetGameIds()
        {
            var gameId1 = GameKeeper.AddGame(4, 4, players);
            var gameId2 = GameKeeper.AddGame(4, 4, players);
            var gameIds = GameKeeper.GetGameIds();

            Assert.IsNotEmpty(gameIds);
            Assert.Contains(gameId1, gameIds);
            Assert.Contains(gameId2, gameIds);
        }
Ejemplo n.º 2
0
        public IHttpActionResult GetGames()
        {
            var games = GameKeeper.GetGameIds();

            var response = new GetGamesResponse()
            {
                games = games
            };

            return(Ok(response));
        }