@Override
    public void actionPerformed(ActionEvent e)
    {
	
	for (Unit u : Model.getInstance().getAllUnits())
	{// GOES THROUGH ATTACKERS AND THEY FIGHT
	    if (u.getAttack() == true)
	    {
		if (u.getPlayerUnit().equals("player"))
		{ // player attacking
		    for (Unit c : Model.getInstance().getEnemies())
		    {
			Battle.getInstance().fight(u, c);
		    }
		}
		else
		{ // comp attacking
		    for (Unit c : Model.getInstance().getPlayers())
		    {
			Battle.getInstance().fight(u, c);
		    }
		}
	    }
	}
	
	for (Unit u : Model.getInstance().getAllUnits())
	{// RESETS ATTACKS AFTER FIRST LOOP (avoids unbalanced play)
	    u.setAttack(false);
	    u.setPreventMovement(false);
	}
	
	for (Unit u : Model.getInstance().getEnemies())
	{
	    AI(u);
	}
	
	if (LocalModel.getInstance().getScreenNumber() == 0 && LocalModel.getInstance().getFadeActive() == false)
	{ // SHINE GAME CREATION LOGO CODE START
	
	    if (LocalModel.getInstance().getCount() == 50)
	    {// COMPLETES SPLASH AND FADES TO TITLE MENU
		LocalModel.getInstance().setScreenUp(true);
		LocalModel.getInstance().setFadeActive(true);
		LocalModel.getInstance().setChangeScreen(true);
	    }
	    
	    LocalModel.getInstance().setCount(LocalModel.getInstance().getCount() + 1);
	    if (LocalModel.getInstance().getCount() > 50)
	    {// RESETS LOCAL MODEL COUNT AFTER FADE IS COMPLETE
		LocalModel.getInstance().setCount(0);
		// popEnemies();
	    }
	    
	}// SHINE GAME CREATION LOGO CODE END
	
	if (LocalModel.getInstance().getFadeActive() == true)
	{ // ------------------FADE CODE START-------------------
	    if (LocalModel.getInstance().getCount() == 9)
	    {// TOGGLE FADE UP OR DOWN AFTER REACHING FULL DARKNESS
		LocalModel.getInstance().setToggle(true);
		
		if (LocalModel.getInstance().getChangeScreen() == true)
		{// CHANGES SCREEN NUMBER IF SOURCE OF FADE
		    if (LocalModel.getInstance().getScreenUp() == true)
		    {
			LocalModel.getInstance().setScreenNumber(LocalModel.getInstance().getScreenNumber() + 1);
			LocalModel.getInstance().setChangeScreen(false);
			// System.out.println("UP");
		    }
		    else
		    {
			LocalModel.getInstance().setScreenNumber(LocalModel.getInstance().getScreenNumber() - 1);
			LocalModel.getInstance().setChangeScreen(false);
			// System.out.println("down");
		    }
		}
		
		if (LocalModel.getInstance().getNewRoom() == true)
		{ // GETS NEW ROOM IF SOURCE OF FADE
		
		    // enemy = new DungeonEnemy(1);
		    LocalModel.getInstance().setNewRoom(false);
		    
		}
		// System.out.println("SCREEN NUMBER: " + screenNumber);
	    }
	    
	    if (LocalModel.getInstance().getToggle() == false)
	    { // INCREASES DARKNESS OF FADE
		LocalModel.getInstance().setCount(LocalModel.getInstance().getCount() + 1);
	    }
	    else
	    {// DECREASES DARKNESS OF FADE
		LocalModel.getInstance().setCount(LocalModel.getInstance().getCount() - 1);
	    }
	    
	    if (LocalModel.getInstance().getCount() == -1)
	    { // COMPLETES THE FADE AND RESETS VARIABLES FOR NEXT USE
		LocalModel.getInstance().setFadeActive(false);
		LocalModel.getInstance().setToggle(false);
		LocalModel.getInstance().setCount(0);
	    }
	} // --------------------FADE CODE END------------------------
    }