private void addSoldierToTile(byte i_Row, byte i_Column) { Soldier soldier = r_GameHandler.GetSoldierAt(i_Row, i_Column); if (soldier != null) { ButtonSoldier buttonSoldier = new ButtonSoldier(); buttonSoldier.Soldier = soldier; buttonSoldier.Click += soldier_Click; m_FormGame.Controls.Add(buttonSoldier); buttonSoldier.Moved += buttonSoldiers_Moved; buttonSoldier.AnimateMoveToTile(m_Tiles[i_Row, i_Column]); } }
private void soldier_Click(object i_Sender, EventArgs i_EventArgs) { ButtonSoldier soldierClicked = i_Sender as ButtonSoldier; tileClickHandler(soldierClicked.Tile); }
private void buttonSoldiers_Moved(ButtonSoldier i_Button) { makeMoveByComputer(); }