private void Init() { boxDoorList = PointLists.boxDoorPointList(); boxList = PointLists.boxPointList(); wallList = PointLists.mapList(stage, '0'); scaleList = MazeList.WallList(stage); directionsInit(); gState = GhostState.NORMAL; target = new Point(); switch (color) { case GhostColor.BLUE: ghost = new Ghost(new Point(30, 28), Direction.UP); break; case GhostColor.PINK: ghost = new Ghost(new Point(26, 28), Direction.DOWN); break; case GhostColor.RED: ghost = new Ghost(new Point(26, 21), Direction.RIGHT); break; case GhostColor.YELLOW: ghost = new Ghost(new Point(22, 28), Direction.UP); break; } map = new Map(scaleList); aStar = new AStar(map); bestFirst = new BestFirst(map); breadthFirst = new BreadthFirst(map); State = GameState.GAMEOVER; }
public void reset(int stage) { boxDoorList = PointLists.boxDoorPointList(); wallList = PointLists.mapList(stage, '0'); fruitState = FruitState.NORMAL; fruit = (stage == 1) ? new Fruit(new Point(26, 33), Direction.RIGHT) : new Fruit(new Point(26, 33), Direction.LEFT); }
private void Init() { boxDoorList = PointLists.boxDoorPointList(); wallList = PointLists.banPointList(); boxList = PointLists.boxPointList(); directionsInit(); switch (color) { case GhostColor.BLUE: ghost = new Ghost(new Point(31, 29), Direction.UP); break; case GhostColor.PINK: ghost = new Ghost(new Point(27, 29), Direction.DOWN); break; case GhostColor.RED: ghost = new Ghost(new Point(27, 22), Direction.RIGHT); break; case GhostColor.YELLOW: ghost = new Ghost(new Point(23, 29), Direction.UP); break; } State = GameState.GAMEOVER; }
public void reset(int stage) { wallList = PointLists.mapList(stage, '0'); scaleList = MazeList.WallList(stage); gState = GhostState.NORMAL; map = new Map(scaleList); aStar = new AStar(map); bestFirst = new BestFirst(map); breadthFirst = new BreadthFirst(map); switch (color) { case GhostColor.BLUE: ghost = new Ghost(new Point(30, 28), Direction.UP); break; case GhostColor.PINK: ghost = new Ghost(new Point(26, 28), Direction.DOWN); break; case GhostColor.RED: ghost = new Ghost(new Point(26, 21), Direction.RIGHT); break; case GhostColor.YELLOW: ghost = new Ghost(new Point(22, 28), Direction.UP); break; } }
private void Init() { boxDoorList = PointLists.boxDoorPointList(); wallList = PointLists.banPointList(); pacman = new Pacman(new Point(27, 40), pacmanDirection); directionsInit(); State = GameState.GAMEOVER; }
private void Init() { boxDoorList = PointLists.boxDoorPointList(); wallList = PointLists.mapList(stage, '0'); directionsInit(); fruitState = FruitState.NORMAL; fruit = (stage == 1) ? new Fruit(new Point(26, 33), Direction.RIGHT) : new Fruit(new Point(26, 33), Direction.LEFT); State = GameState.GAMEOVER; }
public void Run(int fruitIndex, int stage) { this.stage = stage; State = GameState.GAMERUN; wallList = PointLists.mapList(stage, '0'); fruitState = FruitState.NORMAL; fruit = (stage == 1) ? new Fruit(new Point(26, 33), Direction.RIGHT) : new Fruit(new Point(26, 33), Direction.LEFT); fruitRunner = new Task(runfruit); this.fruitIndex = fruitIndex; fruitRunner.Start(); }
private void CheckReset() { if (reset) { board.Clear(); wallList = PointLists.mapList(stage, '0'); dotList = PointLists.mapList(stage, '2'); bonusList = PointLists.mapList(stage, '8'); RePaint(); reset = false; } }
private void Init() { wallList = PointLists.banPointList(); dotList = PointLists.dotPointList(); boxList = PointLists.boxPointList(); boxDoorList = PointLists.boxDoorPointList(); bonusList = PointLists.bonusPointList(); State = GameState.GAMEOVER; score = 0; PacmanDelay = 70; }
private void Init() { wallList = PointLists.mapList(stage, '0'); dotList = PointLists.mapList(stage, '2'); boxList = PointLists.boxPointList(); boxDoorList = PointLists.boxDoorPointList(); bonusList = PointLists.mapList(stage, '8'); fruit.fruitState = FruitState.EATEN; State = GameState.GAMEOVER; AIFlagInit(); score = 0; PacmanDelay = stockPacmanDelay; GhostDelay = stockGhostDelay; }
private void checkForWin() { if (dotList.Count == 0 && bonusList.Count == 0) { parentForm.playSound(Properties.Resources.Pacman_Intermission); State = GameState.GAMEWAIT; WaitSomeTime(2500); while (wait) { } wait = true; dotList = PointLists.mapList(stage, '2'); bonusList = PointLists.mapList(stage, '8'); NextLevel(); AIClockCounter = 0; SetGameRun(2000); } }
public void reset(int stage) { this.stage = stage; board.ClearPacMan(pacman.Point); wallList = PointLists.mapList(stage, '0'); switch (stage) { case 1: pacman = new Pacman(new Point(26, 39), Direction.STOP); break; case 2: pacman = new Pacman(new Point(26, 45), Direction.STOP); break; default: break; } pacmanNextDirection = Direction.STOP; }
private void Init() { boxDoorList = PointLists.boxDoorPointList(); wallList = PointLists.mapList(stage, '0'); switch (stage) { case 1: pacman = new Pacman(new Point(26, 39), Direction.STOP); break; case 2: pacman = new Pacman(new Point(26, 45), Direction.STOP); break; default: break; } directionsInit(); State = GameState.GAMEOVER; }