Exemplo n.º 1
0
 public PacmanGame(frmPacmanGame frm, Panel p)
 {
     parentForm  = frm;
     board       = new PacmanBoard(p);
     Pacman      = new PacmanRun(parentForm, board);
     RedGhost    = new GhostRun(parentForm, board, GhostColor.RED);
     BlueGhost   = new GhostRun(parentForm, board, GhostColor.BLUE);
     PinkGhost   = new GhostRun(parentForm, board, GhostColor.PINK);
     YellowGhost = new GhostRun(parentForm, board, GhostColor.YELLOW);
     this.Init();
     RePaint();
 }
Exemplo n.º 2
0
        public PacmanGame(frmPacmanGame frm, Panel p, Panel pInfo, int difficulty, int algorithm, int pacmanDelay, int ghostDelay, int highScore)
        {
            parentForm  = frm;
            board       = new PacmanBoard(p);
            Pacman      = new PacmanRun(parentForm, board, stage);
            RedGhost    = new GhostRun(parentForm, board, GhostColor.RED, algorithm, stage);
            BlueGhost   = new GhostRun(parentForm, board, GhostColor.BLUE, algorithm, stage);
            PinkGhost   = new GhostRun(parentForm, board, GhostColor.PINK, algorithm, stage);
            YellowGhost = new GhostRun(parentForm, board, GhostColor.YELLOW, algorithm, stage);

            fruit            = new FruitRun(parentForm, board, stage);
            pnlInfo          = pInfo;
            this.difficulty  = difficulty;
            this.algorithm   = algorithm;
            stockGhostDelay  = ghostDelay;
            stockPacmanDelay = pacmanDelay;
            this.highScore   = highScore;
            this.Init();

            RePaint();
        }