public Tetromino getTetriminoWithShape(char shapeType)
        {
            Tetromino tet;

            switch(char.ToUpper(shapeType))
            {
                case 'I':
                    tet = new StraightTetromino();
                    break;
                case 'O':
                    tet = new SquareTetromino();
                    break;
                default:
                    tet = new BasicTetromino(shapeType);
                    break;
            }

            return tet;
        }
예제 #2
0
        public Tetromino getTetriminoWithShape(char shapeType)
        {
            Tetromino tet;

            switch (char.ToUpper(shapeType))
            {
            case 'I':
                tet = new StraightTetromino();
                break;

            case 'O':
                tet = new SquareTetromino();
                break;

            default:
                tet = new BasicTetromino(shapeType);
                break;
            }

            return(tet);
        }