private void When_the_first_player_places_a_three_in_the_first_location()
 {
   Place place = new Place();
   place.GameId = _game.Id;
   place.Coin = new Coin(CoinValue.Three, CoinSide.Heads);
   place.LocationId = _game.Map.Locations.First().Id;
   _game = _gameService.Post(place);
 }
Beispiel #2
0
 public void Place(Place place)
 {
   Location playLocation = Map.Locations.FirstOrDefault(location => location.Id == place.LocationId);
   if (playLocation == null)
   {
     throw new LocationNotInMapException();
   }
   playLocation.AddCoin(place.Coin);
 }
 private void Then_the_first_player_recieves_an_error_if_they_place_a_four_in_the_same_location()
 {
   Place place = new Place();
   place.GameId = _game.Id;
   place.Coin = new Coin(CoinValue.Four, CoinSide.Heads);
   place.LocationId = _game.Map.Locations.First().Id;
   Assert.Throws(typeof (InvalidPlayException), () => _gameService.Post(place), "You should not be able to place higher coin on a lower one.");
 }