public GhostRun(frmPacmanGame frm, PacmanBoard b, GhostColor color) { this.color = color; parentForm = frm; board = b; this.Init(); }
public FruitRun(frmPacmanGame frm, PacmanBoard b, int stage) { this.stage = stage; parentForm = frm; board = b; this.Init(); }
public GhostRun(frmPacmanGame frm, PacmanBoard b, GhostColor color, int algorithm, int stage) { this.color = color; parentForm = frm; board = b; this.algorithm = algorithm; this.stage = stage; this.Init(); }
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(); }
private void btnStart_Click(object sender, EventArgs e) { if (lstvDifficulty.SelectedItems.Count > 0) { difficulty = lstvDifficulty.SelectedItems[0].Index; } if (lstvAlgorithm.SelectedItems.Count > 0) { algorith = lstvAlgorithm.SelectedItems[0].Index; } pacmanDelay = (int)nmrPacmanDelay.Value; ghostDelay = (int)nmrGhostDelay.Value; this.Hide(); frmPacmanGame form = new frmPacmanGame(this, difficulty, algorith, pacmanDelay, ghostDelay, HighScoreList.max()); form.StartPosition = FormStartPosition.CenterScreen; form.Height = Screen.PrimaryScreen.Bounds.Height; form.Show(); }
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(); }
public PacmanRun(frmPacmanGame frm, PacmanBoard b) { parentForm = frm; board = b; this.Init(); }