public SPGameController(MultiplayerTetris.TetrisSinglePlayer tsp, int level, GoalController goalController)
 {
     totalTicks = 0;
     this.level = level;
     this.tsp = tsp;
     this.goalController = goalController;
     this.canvas = (Canvas)tsp.FindName("canvasBoard");
     this.canvas2 = (Canvas)tsp.FindName("nextPieceCanvas");
     this.board = new Board(rows, cols);
     nextP = new Piece(ran.Next(0, 7), -1, 4);
     this.newPiece();
     this.updateGoals();
     this.draw();
     this.drawNext();
     this.linesUpdate(0);
 }
Example #2
0
 public SPGameController(MultiplayerTetris.TetrisSinglePlayer tsp, int level, GoalController goalController)
 {
     totalTicks          = 0;
     this.level          = level;
     this.tsp            = tsp;
     this.goalController = goalController;
     this.canvas         = (Canvas)tsp.FindName("canvasBoard");
     this.canvas2        = (Canvas)tsp.FindName("nextPieceCanvas");
     this.board          = new Board(rows, cols);
     nextP = new Piece(ran.Next(0, 7), -1, 4);
     this.newPiece();
     this.updateGoals();
     this.draw();
     this.drawNext();
     this.linesUpdate(0);
 }