@Override
    public Image paintUnit(Unit u)
    {
	
	String frameName = "";
	
	// FIND DIRECTION PORTION OF KEY
	switch (u.getDirection())
	{
	    case "U":
	    {
		frameName = "up";
		break;
	    }
	    case "D":
	    {
		frameName = "down";
		break;
	    }
	    case "L":
	    {
		frameName = "left";
		break;
	    }
	    case "R":
	    {
		frameName = "right";
		break;
	    }
	}
	
	// FIND THE IMAGE PROGRESSION OF THE KEY
	
	if (u.getAttack() == true || u.getDefend() == true)
	{
	    if (u.getAttack() == true)
	    {
		frameName = frameName + "A";
	    }
	    if (u.getDefend() == true)
	    {
		frameName = frameName + "D";
	    }
	}
	else
	{
	    if (u.getPaintCount() <= 4)
	    {
		frameName = frameName + "1";
		// System.out.println("0-2");
	    }
	    else if ((u.getPaintCount() >= 5 && u.getPaintCount() <= 7) || (u.getPaintCount() >= 13 && u.getPaintCount() <= 15))
	    {
		frameName = frameName + "S";
		// System.out.println("3489");
	    }
	    else if (u.getPaintCount() >= 8 && u.getPaintCount() <= 12)
	    {
		frameName = frameName + "2";
		// System.out.println("got It");
	    }
	}
	
	//System.out.println(frameName);
	return m_images.get(frameName);
	
    }