This site requires JavaScript, please enable it in your browser!
Greenfoot back

Discussions

You need to login to take part
Rss

Current Discussions

lewis4lfc@gmail.com

help with creating flowchart for greenfoot robot

By lewis4lfc@gmail.com, with no replies.
Hi Guys I have created a Greenfoot robot for my university assignment as described below using the following code: import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) /** * Write a description of class robot_1 here. * * @author (your name) * @version (a version number or a date) */ public class robot_1 extends Actor { /** * Act - do whatever the robot_1 wants to do. This method is called whenever * the 'Act' or 'Run' button gets pressed in the environment. */ public void act() { int x = getX(); int y = getY(); //setlocation(x + 1, y); if (Greenfoot.isKeyDown("f")) { move (4); } if (Greenfoot.isKeyDown("b")) { move (-4); } if (Greenfoot.isKeyDown("l")) { turn(-3); } if (Greenfoot.isKeyDown("r")) { turn (3); } } public boolean foundBomb() { Actor bomb = getOneObjectAtOffset(0, 0, bomb_1.class); if(bomb != null) { return true; } else { return false; } } } keys to control robot movement F=Foward, B=Backward, L=left & R=right & here is a video of my robot:http://www.youtube.com/watch?v=IuixdHDPD24 For this Assignment my task is to use Greenfoot, I have been provided with a scenario, as part of this scenario I will have to produce a routine which will control a robot, this robot will be able to navigate across the table & push the bomb by pushing it into the red brick square, The robot will carry the bomb and will be controlled via the keyboard using keys for different directions The bomb and robot is allowed to go through and out of the square in the basic solution only. Must use the scenario provided For the basic solution this must be done within the act() method within the robot class. This report will cover: • What I did throughout the whole assignment • Flow charts • Test plans Does anyone know how I am supposed to create a Flowchart for this Greenfoot robot Using flowchart software QSEE Superlite?, as I do not get how to create a flowchart following this document: http://www.sendspace.com/file/xk8iid thanks