public Main(int newhealthmodifier, int mapnum, Boolean newzombie_Regular,
			Boolean newzombie_Fast, Boolean newzombie_Large,Boolean newzombie_Poison,
			Boolean newzombie_Brute, Boolean newzombie_Witch)
	{		
		zombiehealthmodify = newhealthmodifier;
		
		Zombie_Regular = newzombie_Regular;
		Zombie_Fast = newzombie_Fast;
		Zombie_Large = newzombie_Large;
		Zombie_Poison = newzombie_Poison;
		Zombie_Brute = newzombie_Brute;
		Zombie_Witch = newzombie_Witch;
		
		try
		{
			switch(mapnum)
			{
				case 0:
					map = ImageIO.read(new File("Baseball.png"));
					break;
				case 1:
					map = ImageIO.read(new File("Terminal.png"));
					break;
				case 2:
					map = ImageIO.read(new File("road.png"));
					break;
				case 3:
					map = ImageIO.read(new File("Field.png"));
					break;
			}
		}
		catch (IOException e){e.printStackTrace();}
		
		try{GUI = ImageIO.read(new File("GUI.png"));}catch (IOException e){e.printStackTrace();}
		
		/* these lines create a fullscreen jframe
		 * make it undecorated
		 * changes the cursor to a crosshair
		 * sets the width and height variables to the size of the screen
		 * makes the frame visible
		 * creates the buffer stratagy
		 * and calls the method to add all of the listeners
		 */
		GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
		GraphicsDevice[] gs = ge.getScreenDevices();
		frame = new JFrame(gs[0].getDefaultConfiguration());
		frame.setUndecorated(true);
		frame.setCursor(new Cursor(Cursor.CROSSHAIR_CURSOR));
		gs[0].setFullScreenWindow(frame);
		width = frame.getWidth();
		height = frame.getHeight();
		frame.setVisible(true);
		frame.createBufferStrategy(3);
		buffer = frame.getBufferStrategy();
		addlisteners();
		
		setplayerimg(selectedweapon);
		
		//this timer is the main component of the game, it is the object that runs everything.
		timer = new Timer(15, new ActionListener()
		{
			public void actionPerformed(ActionEvent arg0)
			{
				waittime++;
				hurttime++;
				
				draw();				
				
				while(numOFzombiesonfield<maxnumOFzombies)
					zombies.add(newzombie());
				
				if(numOFzombiesUNTILwitch == 0 && Zombie_Witch)
				{
					zombies.add(newzombie(Zombie.Zombie_Witch));
					if(previousnumOFzombiesUNTILwitch-5 >= 5)
						numOFzombiesUNTILwitch = previousnumOFzombiesUNTILwitch -= 5;
					previousnumOFzombiesUNTILwitch = numOFzombiesUNTILwitch;
				}
				
				//these lines deal with the game timer, obviously it is not very accurate because of the lag caused by the game
				milliseconds++;
				if(milliseconds == 20)
				{
					onesecond++;
					milliseconds = 0;
				}
				if(onesecond == 10)
				{
					tensecond++;
					onesecond = 0;
				}
				if((tensecond*10)+onesecond > 60)
				{
					minutes++;
					tensecond = 0;
					maxnumOFzombies++;
				}
			}
			
		});
		timer.start();

	}