package utilidades;

public class Bot extends Personaje{

	public Bot(String caracter, boolean position) {
		super(caracter, position);
	}
	
	public void mover() {
		int mover = (int)Math.round(Math.random()*3);
		if (mover == 1) {
			if(this.position) {
				if(y<450)this.y++;
			}else {
				if((!this.caja.overlaps(enemigo))&&y<600) {
					this.y++;
				}
			}
		}
		if (mover == 2) {
			if((!this.position)) {
				if(y>0)this.y-=2;
			}else {
				if((!this.caja.overlaps(enemigo))) {
					this.y-=2;
				}
			}
		}
		if(position) {
			this.caja.setPosition(x, y+120);
		}else {
			this.caja.setPosition(x, y);
		}
		
	}

}
