static { // The World kareltherobot.World.setSize(15, 15); kareltherobot.World.setDelay(-5); kareltherobot.World.setBeeperColor(Color.blue.darker()); kareltherobot.World.setStreetColor(Color.blue); kareltherobot.World.setNeutroniumColor(Color.green.darker()); kareltherobot.World.setVisible(true); }
/* * Modify this to manipulate the World. */ static { kareltherobot.World.setSize(100, 100); kareltherobot.World.setDelay(1); kareltherobot.World.setBeeperColor(Color.magenta); kareltherobot.World.setStreetColor(Color.blue); kareltherobot.World.setNeutroniumColor(Color.green.darker()); // kareltherobot.World.readWorld("folder", "worldfile"); // kareltherobot.World.showSpeedControl(true); // See the JavaDocs for class World for more options kareltherobot.World.setVisible(true); }
public static void main(String[] args) { World.setSize(10, 22); World.setVisible(true); World.setDelay(0); MessageScribe sophia = new MessageScribe(5, 1, East, infinity); MessageScribe matthew = new MessageScribe(2, 1, East, infinity); MessageScribe josh = new MessageScribe(3, 1, East, infinity); MessageScribe mark = new MessageScribe(4, 1, East, infinity); MessageScribe john = new MessageScribe(1, 1, East, infinity); sophia.scribeOne(); matthew.scribeTwo(); josh.scribeThree(); mark.scribeFour(); john.scribeFive(); }
/* * Modify this to manipulate the World. */ static { kareltherobot.World.setSize(12, 12); kareltherobot.World.setDelay(50); kareltherobot.World.setBeeperColor(Color.magenta); kareltherobot.World.setStreetColor(Color.blue); kareltherobot.World.setNeutroniumColor(Color.green.darker()); for (int i = 1; i < 10; i++) { kareltherobot.World.placeNSWall(1, (int) (Math.random() * 8 + 1), (int) (Math.random() * 4)); } // kareltherobot.World.readWorld("folder", "worldfile"); // kareltherobot.World.showSpeedControl(true); // See the JavaDocs for class World for more options kareltherobot.World.setVisible(true); }