This tomato is attracted to the ship, and will destroy the ship on contact, for the ship's tomato storage will all be infected. I do not know where my source code should be changed. (most recent one will overwrite the previous) My professor told me that the greeps should catch at least 15 tomatoes in 15 seconds in each map. Die Greeps werden zufällig vom Raumschiff ausgegeben, deswegen ist der Versuch, die Greeps in Gruppen zu möglichst effektiver Suche zu organisieren, zwecklos. ![]() The Pink Tomato allows for upgrade in the speed of fire of the Greepsīut since there is a limited space on the ship, only one type of upgrade may be used at a time. Greeps können nicht direkt miteinander kommunizieren (darauf gehen wir später noch ein) und es gibt auch kein kollektives Bewusstsein. The Yellow Tomato allows for upgrade, which allows the ship to shoot one more greep at a time These bonuses must be obtained by making a direct contact using a ship. There are bonuses that may appear when a Greep takes a tomato from a tomato pile. Press X to use the GBomb (greeps launched in all directions) Use down arrow key to cause instaneous stop (greep technology) The spaceship, in search of the tomato as usual, carries greeps that can be launched towards the tomato pile and return to the ship, just like the original simulation.īut the Greep scientists have reported that the tomatoes have to be brought in only with greeps as an individual tomato, for making direct contact with the pile will cause the ship to blow up. The piles, rather than being stationary as in the original simulation, are now floating around with constant velocity. Greeps have found new source of tomatopiles in space. If (getIntersectingObjects(Paint.This project was inspired by the Greeps simulation. SetRotation((int) (180 * Math.atan2(deltaY, deltaX) / Math.PI)) I took the greeps file and edited it for my Computer science 30 class so I could better understand how to read and write script. Int deltaY = getOneIntersectingObject(TomatoPile.class).getY() - getY() Int deltaX = getOneIntersectingObject(TomatoPile.class).getX() - getX() If (getOneIntersectingObject(TomatoPile.class) = null) * This method specifies the image we want displayed at any time. ![]() Return "Anonymous" // write your name here! * This method specifies the name of the author (for display on the result board). Note: this attempts to load a tomato onto *another* Greep. TomatoPile tomatoes = (TomatoPile) getOneIntersectingObject(TomatoPile.class) View Greeps Code - Vuong Nguyen Hoang from CSP 101 at Ardrey Kell High. check whether there's a tomato pile here ![]() * Is there any food here where we are? If so, try to load some! Super.act() // do not delete! leave as first statement in act(). * Create a Greep with its home space ship. * Default constructor for testing purposes. Greenfoot unterstützt die Entwicklung von grafischen Anwendungen in der Programmiersprache Java. no additional fields (other than final fields) allowed in this class! Greenfoot ist ein Software-Werkzeug und wurde entwickelt, damit Anfänger Erfahrung mit der objekt-orientierten Programmierung sammeln können. Remember: you cannot extend the Greep's memory. * A Greep is an alien creature that likes to collect tomatoes. Import greenfoot.* // (World, Actor, GreenfootImage, and Greenfoot) My question was how I could solve this problem? ![]() The strange thing is that the exact same code worked perfectly fine at school. This happens when one of the greeps touches the water at the edge of the map (what couses it to leave the world a litle bit). It was: 603 and it should have been smaller than: 600Īt (GreenfootImage.java:571)Īt (GreenfootImage.java:528)Īt (Simulation.java:507)Īt (Simulation.java:470)Īt (Simulation.java:204)Īt (Simulation.java:194) I get the folowing error when I run my greeps:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |