public void update()
	{
		if (dir == LEFT)
		{
			dx = -(Catamaran.CHAR_SPEED+1);
			dy = 0; 
		}
		else if (dir == RIGHT)
		{
			dx = (Catamaran.CHAR_SPEED+1);
			dy = 0; 
		}
		else if (dir == UP)
		{
			dx = 0; 
			dy = -(Catamaran.CHAR_SPEED+1);
		}
		else if (dir == DOWN)
		{
			dx = 0; 
			dy = (Catamaran.CHAR_SPEED+1);
		}
		else 
		{
			dx = 0; 
			dy = 0; 
		}
		locx += dx;
		locy += dy;
		if ( (locy <= app.MINY) || (locy + height >= app.VHEIGHT) )
		{
            switchDirection();
		}
		else if ( (locx <= 0) || (locx + width >= app.MAXX) )
		{
			switchDirection();
		}
	}