Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

Java logic not working in processing?

$
0
0

I'm attempting to create a program while also importing a .jar file, but all I keep getting is an empty grey square.

 import kareltherobot.*;

 class Driver implements Directions {

   Robot karel = new Robot(1, 1, East, 0);

   void robot() {

     new Driver().start();
   }

   private void start() {

     World.setDelay(20);

     World.setVisible(true);

     World.readWorld("hurdles.kwld");

     karel.turnOff();

   }

 }

This works in java, and I'm not getting any errors running it in Processing, but it's also just giving me the default grey square. It's probably pretty obvious that I'm new to Processing :(

If anyone could help me out that would be great :D


Viewing all articles
Browse latest Browse all 2896

Trending Articles