Esempio n. 1
0
        public void AddVoteForGame(Game game)
        {
            var votedGame = _games.FirstOrDefault(x => x.Equals(game));

            //TODO: Fix this later Need to tell caller about not finding game.
            if (votedGame != null)
                votedGame.AddVote();
        }
Esempio n. 2
0
        public void SessionSuggestion_can_have_single_game()
        {
            var session = new GameNight(GameNightState.Suggested, 1);

            var game = new Game("Test Game", 1, 4, 3);

            session.AddSuggestedGame(game);

            Assert.AreEqual(game, session.GetGames().First());
        }
Esempio n. 3
0
        public void User_can_request_play_for_certain_game()
        {
            //This is awful. But I will refactor it soon. Just testing possble solutions to this currently
            var session = new GameNight(GameNightState.Suggested, 2);
            var game = new Game("Robinson Crusoe", 1, 4, 2);

            session.AddSuggestedGame(game);
            session.AddVoteForGame(game);

            Assert.AreEqual(1, session.GetGighestVotedGame().GetNumberOfVotes());
        }
Esempio n. 4
0
 public void AddSuggestedGame(Game game)
 {
     _games.Add(game);
 }