public async Task PickupNothing() { var game = new Game(); var communicator = new DirectCommunicator(); var gameProxy = new Library.Level1.Game(communicator); var decoder = new Messaging.Level1.Actions.ActionDecoder(); game.Seed = 0; game.Initialize(); var responseTask = gameProxy.PickupAsync(); var decodedResponse = await ExecuteRequestedAction(decoder, communicator, game, responseTask); decodedResponse.Perceptions.Should().BeEmpty(); decodedResponse.GameState.MovesLeft.Should().Be(99); game.GameState.Should().Be(GameState.Running); }
public async Task PickupGold() { var game = new Game(); var communicator = new DirectCommunicator(); var gameProxy = new Library.Level1.Game(communicator); var decoder = new Messaging.Level1.Actions.ActionDecoder(); game.Seed = 0; game.Initialize(); game.State.PlayerPosition = (3, 2); var responseTask = gameProxy.PickupAsync(); var decodedResponse = await ExecuteRequestedAction(decoder, communicator, game, responseTask); decodedResponse.Perceptions.Should().Contain(Library.Level1.Enums.Perception.Win); decodedResponse.GameState.MovesLeft.Should().Be(99); game.GameState.Should().Be(GameState.Win); }