private void Form1_KeyDown(object sender, KeyEventArgs e) { int idxButton = FindIndexOfPushButton(e); if (idxButton < 4) { game.Move((Direction)idxButton, random); UpdateAttackRange((Direction)idxButton, false); } else { game.Attack((Direction)(idxButton - 4), random); } buttonCtrl[idxButton].ForeColor = Color.White; buttonCtrl[idxButton].BackColor = Color.Crimson; UpdateCharacters(); }
private void OnButtonMoveUpClick(object sender, EventArgs e) { _game.Move(Direction.Up, _random); UpdateCharacters(); }
private void MoveLeftButton_Click(object sender, EventArgs e) { game.Move(Direction.Left, random); UpdateCharacters(); }
private void up_Click(object sender, EventArgs e) { game.Move(Direction.Up, random); UpdateCharacters(); }
private void MoveLeft() { game.Move(Direction.Left, random); UpdateCharacters(); }
private void button1_Click(object sender, EventArgs e) { game.Move(The_Quest.IDirection.Direction.Up, random); UpdateCharacters(); }