Back to index

plt-scheme  4.2.1
World.java
Go to the documentation of this file.
00001 package idraw;
00002         
00003 public abstract class World {
00004  protected Canvas theCanvas; 
00005  public void bigBang(int width, int height, double s) {
00006        if (width <= 0)
00007            throw new RuntimeException(
00008                      "The method bigBang(int,int,double) expects " +
00009                      "the first argument to be greather than 0, given " 
00010                      + width);
00011        if (height <= 0)
00012            throw new RuntimeException(
00013                        "The method bigBang(int,int,double) expects " +
00014                      "the second argument to be greather than 0, given " 
00015                      + height);
00016        if (s <= 0)
00017            throw new RuntimeException(
00018                        "The method bigBang(int,int,double) expects " +
00019                      "the third argument to be greather than 0, given " 
00020                      + s);
00021        theCanvas = new Canvas(width,height); 
00022        bigBangO(s);
00023        return ; 
00024     }
00025  private native void bigBangO(double s);
00026 
00027  // --------------------------------------------------------    
00028 
00029  public native boolean endOfTime(String s);
00030  public native World endOfWorld(String s);
00031  public abstract void onTick();
00032  public abstract void onKeyEvent(String ke); 
00033  public abstract void draw();
00034 }