示例#1
0
文件: Form1.cs 项目: s4lt3d/NEAT
        private void Form1_KeyDown(object sender, KeyEventArgs e)
        {
            switch (e.KeyCode)
            {
            case Keys.Left:
                tetris.Move(TetrisGame.Actions.MoveLeft);
                break;

            case Keys.Right:
                tetris.Move(TetrisGame.Actions.MoveRight);
                break;

            case Keys.Up:
                tetris.Move(TetrisGame.Actions.RotateLeft);
                break;

            case Keys.Down:
                tetris.Move(TetrisGame.Actions.MoveDown);
                break;
            }
        }