private void YearOfPlenty() { var curPlayer = _gameController.CurrentPlayer; var yop = new ResourceSelect(); yop.ShowDialog(); var choice1 = yop.Result; var choice2 = yop.OtherResult; curPlayer.ResourceHand.Add(choice1); curPlayer.ResourceHand.Add(choice2); }
private void Monopoly() { var curPlayer = _gameController.CurrentPlayer; var monopoly = new ResourceSelect(); monopoly.ShowDialog(); var choice = monopoly.Result; var count = 0; foreach(var player in _gameController.Players) { if (player == curPlayer) continue; for (var i=0; i<player.ResourceHand.Count; i++) { var card = player.ResourceHand[i]; if (card == choice) { count++; } } player.ResourceHand.RemoveAll(card => card == choice); } for (var i=0; i<count; i++) { curPlayer.ResourceHand.Add(choice); } }