Ejemplo n.º 1
0
 //Authors: <Brian and Morgan>
 public GameState()
 {
     this.gameOver          = false;
     this.currentLevel      = 0;
     this.currentScore      = 0;
     this.totalLinesCleared = 0;
     this.activeShape       = ShapeGenerator.GenerateShape(this.currentLevel);
     this.activeShape.MoveShapeToSpawn();
     this.nextShape = ShapeGenerator.GenerateShape(this.currentLevel);
     this.grid      = new BlockGrid(Constants.GAME_MAX_X, Constants.GAME_MAX_Y);
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            InitializeGlut();

            ShaderProgram = new ShaderProgram(VertexShader, FragmentShader);
            watch         = Stopwatch.StartNew();

            Grid = new Grid();

            Shape = ShapeGenerator.GenerateShape(5);

            Glut.glutMainLoop();
        }
Ejemplo n.º 3
0
        public void GenerateShapeTest()
        {
            GameShape textShape = ShapeGenerator.GenerateShape(1);

            Assert.IsTrue(textShape is GameShape);
        }
Ejemplo n.º 4
0
 public void activateNext()
 {
     this.activeShape = this.nextShape;
     activeShape.MoveShapeToSpawn();
     this.nextShape = ShapeGenerator.GenerateShape(this.currentLevel);
 }