import info.gridworld.actor.Actor;
import info.gridworld.grid.Location;
import info.gridworld.grid.BoundedGrid;
import info.gridworld.actor.ActorWorld;
import java.util.ArrayList;
import java.awt.Color;
public class ActorListOne
{
public static void main(String[] args)
{
ActorWorld world = new ActorWorld(new BoundedGrid<Actor>(5,5));
ArrayList<Actor> actList = new ArrayList<Actor>();
//add in least three actor references to actList
actList.add(new Actor());
actList.add(new Actor());
actList.add(new Actor());
//set each actor to a different color (GREEN, YELLOW, RED)
actList.get(0).setColor(Color.GREEN);
actList.get(1).setColor(Color.YELLOW);
actList.get(2).setColor(Color.RED);
//use a loop to add all actor references to the world at different locations
for (int i = 0; i<actList.size; i++)
{
world.add(new Location(i,i), actList.get(i));
}
world.show();
}
}
I am given an error saying:
cannot find symbol class Actor line 18
cannot find symbol class Actor line 20
cannot find symbol class Actor line 20
cannot find symbol class Actor line 23
cannot find symbol class Actor line 24
cannot find symbol class Actor line 25
cannot find symbol class ActorWorld line 18
cannot find symbol class ActorWorld line 18
cannot find symbol class BoundedGrid line 18
cannot find symbol class Location line 35
package info.gridworld.actor does not exist line 7
package info.gridworld.actor does not exist line 10
package info.gridworld.grid does not exist line 8
package info.gridworld.grid does not exist line 9
Is this in my code ( and if it is can someone please give me a direction to go in to correct this) or is this due to the fact I am having some problems opening the JCP file?
Any help would be greatly appreciated Thank You!

New Topic/Question
Reply


MultiQuote




|