This site requires JavaScript, please enable it in your browser!
Greenfoot
Username
Password
Remember Me?
Sign Up, Lost Password
Activity
About
Documentation
Download
Discuss
Scenarios
Discussions
You need to login to take part
Current Discussions
The Travelling Salesman Problem
By blankaex, with no replies.
I'm trying to make a program that can solve the travelling salesman problem. I have the basic skeleton of the program with a class for cities, and a bunch of generated instances. How do I go about implementing the logic and the solution? I have a general idea on the concept, such as a boolean to declare whether or not a city has been visited, and things to do with the nearest neighbour algorithm and brute-force method, but I don't really know how to write that into greenfoot. Where should I go from here?
Has anyone here ever done the "FatCat" project?
By iSuckAtGreenfoot, with 4 replies.
Last reply by iSuckAtGreenfoot, over 12 years ago:
Thanks so much for your help! I really appreciate it :)
Font from dafont
By w9ndel, with 2 replies.
Last reply by Lollygag, over 12 years ago:
My game which use custom font
Grabbing a boolean from another Actor.
By DennisDvD, with 2 replies.
Last reply by DennisDvD, over 12 years ago:
Thanks so much Dan, it worked :) Appreciate your help!
Resetting boolean
By applefan57, with 10 replies.
Last reply by applefan57, over 12 years ago:
This worked thank you, although I still used the boolean; I set it to false if Dice.roll = 0, and I made Dice.roll 0 after every roll, thank you!!
Facing of actor in different direction
By parthshah333, with 1 reply.
Replied to by danpost, over 12 years ago:
Use an instance int field to track the direction (or the "rotation" that it would take on to move in the direction wanted). Then to move: set the rotation of the actor to the value of the field, move the actor and then reset the rotation of the actor back to zero.
Help Making a object break up to other objekt/images
By nc-munk, with 15 replies.
Last reply by danpost, over 12 years ago:
Like if your class was called Fragment, in the block of code headed by this line: <Code Omitted>
Can't export program as application Urgent!
By Zzimon, with 1 reply.
Replied to by Zzimon, over 12 years ago:
Fixed, my worlds were too big for it to work with the applet format.
Selecting characters and switching them with others
By Zzimon, with 186 replies.
Last reply by Zzimon, over 12 years ago:
Fixed it, phew. Just had to make my world smaller like you said and it worked, I think it was because the heap space error thingy that it just went grey and it refused to show any info so I made my world into a 7x7 instead of 20x10 and then it worked. Thanks for saying that when you tried it out, else I wouldn't have known :)
How to add color values to an existing color?
By Entity1037, with 1 reply.
Replied to by Zamoht, over 12 years ago:
Something like this I believe. Color color = image.getColorAt(x,y); Color newColor = new Color(color.getRed(), color.getGreen()+40, color.getBlue()); image.setColorAt(x,y,newColor);
NullPointerException Error.
By DennisDvD, with no replies.
Fixed...
Help with getOneIntersectingObject
By nc-munk, with 8 replies.
Last reply by nc-munk, over 12 years ago:
thanks
Is there a way to detect one edge of the world with atworldsedge
By nc-munk, with 5 replies.
Last reply by nc-munk, over 12 years ago:
thanks anyway if you have time would you take a look at another post of mine (Help Making a object break up to other objekt/images)
help with animating clara (pacman game)
By dangwang, with 10 replies.
Last reply by dangwang, over 12 years ago:
You are a legend. Thanks so much!!!!
Method drawImage(image,x,y,ImageObserver); not working.
By Entity1037, with 8 replies.
Last reply by Entity1037, over 12 years ago:
Well...... OK then! TIME TO STUDY!!!!
691
692
693
694
695
696
697
X