private static void endGame()
	{
		for(Creature c : Empire.getInstance().CREATURES)
		{
			c.kill();
		}
		
		Empire.SoundsOfEmpire.closeBackgroundMusic();
		Empire.SoundsOfEmpire.playEndgameMusic();
		//System.out.println("the game is over bitches!");
		Saver saver = new Saver();
		saver.save();
		String gameTime = saver.getGameTime();
		
		JPanel endPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
		//endPanel.setLayout(new BoxLayout(endPanel, BoxLayout.Y_AXIS));
		endPanel.setForeground(Empire.EmpireDrawer.COLOR_BLACK);
		endPanel.setBackground(Empire.EmpireDrawer.COLOR_BLACK);
	
		//endPanel.setAlignmentX(JPanel.CENTER_ALIGNMENT);
		
		final JFrame begFrame = new JFrame();
		begFrame.setSize(new Dimension (20,20));
		begFrame.setIconImage(Toolkit.getDefaultToolkit().getImage(RomanLegion.class.getResource("graphics/legionist_icon.png")));
		begFrame.setVisible(false);	
		
		
		final JWindow endingFrame = new JWindow(begFrame);
		endingFrame.setSize(new Dimension(480, 320));
		//endingFrame.
		
		Dimension displaySize = Toolkit.getDefaultToolkit().getScreenSize();
		endingFrame.setLocation((displaySize.width - endingFrame.getWidth())/2, (displaySize.height - endingFrame.getHeight())/2);
		
		JLabel header = new JLabel("Congratulations, " + Empire.getInstance().getEmperor());
		header.setForeground(Empire.EmpireDrawer.COLOR_GOLD);
		header.setFont(Empire.EmpireDrawer.TIMES_BOLD_24);
		endPanel.add(header);
		
		JLabel title = new JLabel("You have finished 'The Lord of Rome' !  ");
		endPanel.add(new JLabel("   "));
		title.setForeground(Empire.EmpireDrawer.COLOR_GOLD);
		title.setFont(Empire.EmpireDrawer.TIMES_BOLD_24);
		endPanel.add(title);
		endPanel.add(new JLabel(" "));
		
		JLabel gameTimeLabel = new JLabel("Your time is:   " + gameTime);
		gameTimeLabel.setFont(Empire.EmpireDrawer.TIMES_BOLD_20);
		gameTimeLabel.setForeground(Empire.EmpireDrawer.COLOR_WHITE);
		endPanel.add(gameTimeLabel);
		endPanel.add(new JLabel("   "));
		endPanel.add(new JLabel("   "));
		
		endPanel.add(new JLabel(Empire.EmpireDrawer.END_IMAGE));
	
		
		JButton endButton = new JButton("   The End   ");
		endButton.setFont(Empire.EmpireDrawer.TIMES_BOLD_24);
		endButton.setBackground(Empire.EmpireDrawer.COLOR_GOLD);
		JPanel buttonPanel = new JPanel();
		buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));
		buttonPanel.add(endButton);
		//endPanel.add(buttonPanel);
		endPanel.add(endButton);
		endButton.addActionListener(new ActionListener(){

			@Override
			public void actionPerformed(ActionEvent arg0) 
			{
				endingFrame.setVisible(false);
				endingFrame.dispose();
			
				begFrame.setVisible(false);
				Empire.EmpireDrawer.empireFrame.dispose();
				begFrame.dispose();
				
				System.exit(0);
				
			}
		});
		
		endingFrame.add(BorderLayout.CENTER, endPanel);
		
		Empire.EmpireDrawer.empireFrame.setVisible(false);
		endingFrame.setVisible(true);
		begFrame.setLocation(endingFrame.getLocation());
		begFrame.setVisible(true);
	}