// CS 2510 Spring 2011 // Assignment 4 // ChickenWorld.java import world.*; import image.*; import tester.*; // Represents a Cartesian point, X/Y come from the // super class, Posn. class CartPt extends Posn{ CartPt(int x, int y){ super(x,y); } /* Template: * Fields * ... this.x ... -- int * ... this.y ... -- int */ } // Represents a simple World where the location moves toward // a target, which is replaced on mouse clicks. class ChickenWorld extends World{ ChickenWorld(){ // Need to add stuff here... } /********************************** * Need to design these methods... **********************************/ // Draw this Chicken World public Scene onDraw(){ return new EmptyScene(400, 400); } // Move Cars, check the chicken, etc. public ChickenWorld onTick(){ return this; } // Move the chicken public ChickenWorld onKey(String ke){ return this; } } // Examples class ChickenWorldExamples{ ChickenWorld start = new ChickenWorld(); World result = start.bigBang(); // Examples, Tests, etc... }