All pastes #2056734 Raw Edit

Something

public text v1 · immutable
#2056734 ·published 2011-05-11 11:32 UTC
rendered paste body
package custom;
import java.awt.Color;
import java.math.*;
import info.gridworld.grid.Location;
import info.gridworld.actor.Actor;
public class Enemy extends Actor{
	Color self;
	public Enemy(){
		setColor(Color.RED);
		self = Color.RED;
	}
	public Enemy(Color a){
		setColor(a);
		self = a;
	}
	public void act(){
		int dir = (int)(Math.random()*6);
		Location curr = getLocation();
		if(dir == 0)
			moveRight();
		if( dir == 1)
			moveLeft();
		if(dir == 2)
			moveUp();
		if(dir = 3)
			moveDown();
		if(dir = 4)
			Shoot();
	}
}