Example #1
0
        private void tmrGame_Tick(object sender, EventArgs e)
        {
            game.Go();

            foreach (Keys key in keysPressed)
            {
                if (key == Keys.Left)
                {
                    game.MoveCurrentShape(Direction.Left);
                    return;
                } // end if

                else if (key == Keys.Right)
                {
                    game.MoveCurrentShape(Direction.Right);
                    return;
                } // end else if
                else if (key == Keys.Down)
                {
                    game.MoveCurrentShape(Direction.Down);
                    return;
                } // end else if
            }     // end foreach
        }