private void timer_Tick(object sender, EventArgs e) { switch (game.GetState()) { case Game.GameState.Waiting: GrowStick(); break; case Game.GameState.StickFalling: DropStick(); break; case Game.GameState.HeroMoving: MoveHero(); break; case Game.GameState.BoardMoving: game.MoveBoard(); break; case Game.GameState.HeroFalling: DropHero(); break; } PlayingBoardPictureBox.Refresh(); }
public GameForm() { InitializeComponent(); SetElementsParameters(); game.Start(); timer.Interval = 1; game.Restart(); timer.Start(); PlayingBoardPictureBox.Refresh(); }