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

2011/10/11

Let op! ¡ Cuidado! Beware! Vorsicht! Tenha cuidado! 小心 !

Significance Significance

2011/10/11

#
Before I run a scenario, I always look what I unpacked. What I would like to know is why... after unpacking for example the SlingShot.gfar and the Fibbanochi.gfar file... there are so many irrelevant files in the created map e.g. why did you put them there and why are you polluting my computer with those files?
kiarocks kiarocks

2011/10/11

#
i did not put them there
danpost danpost

2011/10/11

#
@Significance, How does one go about 'unpacking' a 'gfar' file?
mjrb4 mjrb4

2011/10/11

#
A gfar file is a zip file of the scenario's contents, so it can be unpacked trivially. I'd question what irrelevant files there are though - I've just opened the SlingShot scenario and I've got the images folder that stores the images for the scenario (I'm sure you won't argue they're irrelevant), the project.greenfoot file (stores details about the greenfoot project, also highly necessary) and the source files (contain the Java source), class files (contain the compiled code) and ctxt files (used to tag information internally) for each class. What out of those files count as pollution?!
danpost danpost

2011/10/12

#
@kiarocks, are there supposed to be as many dots shown as the latest number found in the series? If so, the screen fills up with dots well before the first row of numbers is complete (that is, before "/n" is added the first time). Also, I change NumberWorld to the following:
import greenfoot.*;

public class NumberWorld extends World
{
    int addeddots = 0;
    Counter myCounter;

    public NumberWorld()
    {    
        super(600, 400, 1);
        Counter counter = new Counter();
        myCounter = counter;
        addObject(myCounter, 302, 191);
    }

    public void act() { addDots(); }

    public void addDots()
    {
        numdots = myCounter.c;
        while (addeddots < numdots)
        {
            addeddots ++;
            int myRowElement = addeddots % 119; // This is the position within the row where the dot goes
            int myRow = (addeddots - myRowElement) / 119; // This is the row the dot goes in
            addObject(new Dot(5), myRowElement * 5 + 4, 5 + myRow * 6);
        }
    }
}
I think this was the single while loop you were trying to figure out how to code.
kiarocks kiarocks

2011/10/12

#
if you look at the new scenario, it contains my single loop
Significance Significance

2011/10/14

#
Fibbanochi - Class.java~ Counter.java~ Dot.java~ NumberWorld.java~ SlingShot - Dot.java~ Pellet.java~ Picture.java~ ScreenText.java~ Slingshot.java~ TestWorld.java~ Disculpe mi english: it is broken.
davmac davmac

2011/10/14

#
Those are just backups of the source files. They are harmless.
You need to login to post a reply.