private void fightButton(object sender, EventArgs e) { if ((label6.Text.Length) > 0 && (label7.Text.Length > 0)) { Console.WriteLine("FIGHT"); String player1_card = label6.Text; String player2_card = label7.Text; if (player_1.IsBonusWar)//w tym przypadku karty nie walcza ale sa dodane do puli do wojny { player_1.addCardsToWarBonus(player1_card, player2_card); player_2.addCardsToWarBonus(player2_card, player1_card); } else { player_1.cardBattle(player1_card, player2_card); player_2.cardBattle(player2_card, player1_card); } if (player_1.IsWar && player_2.IsWar) { addCardsToWarListBox(player_1.War.MyCardDeck, player_1.War.OpponentCardDeck); } else { Console.WriteLine("PLAYER 1 after battle"); player_1.printCurrentDeck(); player_1.printWonCardsDeck(); Console.WriteLine("PLAYER 2 after battle"); player_2.printCurrentDeck(); player_2.printWonCardsDeck(); /* * listBox1.Items.Clear(); * listBox2.Items.Clear(); * listBox3.Items.Clear(); * listBox4.Items.Clear(); */ //player_1.addCardsToWarBonus(player1_card, player2_card); //player_2.addCardsToWarBonus(player2_card, player1_card); addCardsToWarListBox(player_1.War.MyCardDeck, player_1.War.OpponentCardDeck); loadCurrentDeck(player_1.CurrentDeck, 1); loadWonCardsDeck(player_1.WonCardsDeck, 1); loadCurrentDeck(player_2.CurrentDeck, 2); loadWonCardsDeck(player_2.WonCardsDeck, 2); } label6.Text = ""; label7.Text = ""; } }