public void setLevelState() { board.setGridPositionOpen(darwin); darwin.setGridPosition(21, 20); board.setGridPositionOccupied(darwin); board.setGridPositionOpen(firstZombie.X, firstZombie.Y); firstZombie.setGridPosition(10, 9); board.setGridPositionOccupied(firstZombie.X, firstZombie.Y); firstZombie.setZombieAlive(true); board.setGridPositionOpen(secondZombie.X, secondZombie.Y); secondZombie.setGridPosition(12, 9); board.setGridPositionOccupied(secondZombie.X, secondZombie.Y); secondZombie.setZombieAlive(true); board.setGridPositionOpen(thirdZombie.X, thirdZombie.Y); thirdZombie.setGridPosition(8, 8); board.setGridPositionOccupied(thirdZombie.X, thirdZombie.Y); thirdZombie.setZombieAlive(true); board.setGridPositionOpen(fourthZombie.X, fourthZombie.Y); fourthZombie.setGridPosition(8, 12); board.setGridPositionOccupied(fourthZombie.X, fourthZombie.Y); fourthZombie.setZombieAlive(true); List <Zombie> myZombieList = new List <Zombie>(); myZombieList.Add(firstZombie); myZombieList.Add(secondZombie); myZombieList.Add(thirdZombie); myZombieList.Add(fourthZombie); cannibalZombie.updateListOfZombies(myZombieList); board.setGridPositionOpen(cannibalZombie.X, cannibalZombie.Y); cannibalZombie.setGridPosition(29, 3); board.setGridPositionOccupied(cannibalZombie.X, cannibalZombie.Y); cannibalZombie.setZombieAlive(true); potion.setGridPosition(3, 3); potion.reset(); zTime.reset(); zTime.setTime(zTimeReset.getTime()); darwin.setHuman(); darwin.setDarwinAlive(); playDeathSound = true; playSound = true; gameOverCounter = 0; gameOver = false; gameWin = false; Keyboard.GetState(); }
// for conveniently reseting level public void setLevelState() { gameOver = false; gameWin = false; fellDownPit = false; fellDownCounter = 0; board.setGridPositionOpen(darwin); darwin.setGridPosition(2, 20); zTime.reset(); board.setGridPositionOpen(firstZombie); board.setGridPositionOpen(secondZombie); board.setGridPositionOpen(thirdZombie); board.setGridPositionOpen(fourthZombie); board.setGridPositionOpen(fifthZombie); board.setGridPositionOpen(sixthZombie); board.setGridPositionOpen(brain); board.setGridPositionOpen(potion); firstZombie.setGridPosition(10, 10); board.setGridPositionOccupied(firstZombie.X, firstZombie.Y); firstZombie.setZombieAlive(true); secondZombie.setGridPosition(10, 16); board.setGridPositionOccupied(secondZombie.X, secondZombie.Y); secondZombie.setZombieAlive(true); thirdZombie.setGridPosition(12, 10); board.setGridPositionOccupied(thirdZombie.X, thirdZombie.Y); thirdZombie.setZombieAlive(true); fourthZombie.setGridPosition(20, 7); board.setGridPositionOccupied(fourthZombie.X, fourthZombie.Y); fourthZombie.setZombieAlive(true); fifthZombie.setGridPosition(22, 10); board.setGridPositionOccupied(fifthZombie.X, fifthZombie.Y); fifthZombie.setZombieAlive(true); sixthZombie.setGridPosition(22, 10); board.setGridPositionOccupied(sixthZombie.X, sixthZombie.Y); sixthZombie.setZombieAlive(true); potion.setGridPosition(25, 4); brain.setGridPosition(3, 3); brain.setVisible(true); board.setGridPositionOccupied(brain.X, brain.Y); potion.reset(); darwin.setHuman(); darwin.setDarwinAlive(); playDeathSound = true; firstSwitch.turnOn(); firstSwitch.turnOn(); Keyboard.GetState(); }