public void AfterPlacingTwoArmiesYouHaveThreeArmiesRemaining() { var location = new Location(0, 0); game.TryPlaceArmy(player1Token, location); game.TryPlaceArmy(player1Token, location); var remainingArmies = game.GetPlayerRemainingArmies(player1Token); remainingArmies.Should().Be(3); }
private async Task <DeployArmyResponse> askForDeployLocationAsync(ApiPlayer currentPlayer, DeploymentStatus deploymentStatus) { var deployArmyRequest = new DeployArmyRequest { Board = game.Board.SerializableTerritories, Status = deploymentStatus, ArmiesRemaining = game.GetPlayerRemainingArmies(currentPlayer.Token) }; var json = System.Text.Json.JsonSerializer.Serialize(deployArmyRequest); var deployArmyResponse = (await currentPlayer.HttpClient.PostAsJsonAsync("/deployArmy", deployArmyRequest)); deployArmyResponse.EnsureSuccessStatusCode(); var r = await deployArmyResponse.Content.ReadFromJsonAsync <DeployArmyResponse>(); return(r); }