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
What is happening right now?
Latest Scenarios
game3
game-3
game5
my first game
game-1
bear
more
Popular Scenarios
Street Life
Spacebear
FFFFFF
Plants Vs Zombi...
Cyan Guardian S...
frog platformer...
more
Popular Users
more
Popular Collections
Optical Illusions
Reusable actors...
Scenario showcase
Demos by danpost
more
Comment on Tank Target Practice
By crashjet - about 2 hours ago
no I am simply your father I am Q
reply to problem with neighbor count
By ttt_ - about 7 hours ago
danpost wrote...
ttt wrote...
The Actor method getNeighbours() gives strange results in certain situations. << Code Omitted >>
I do not seem to be getting any strange results. Maybe you can give examples. Like, for what image do you get for what strange results (that is, give image AND results). The results can be given as in the following: For image "yellow-draught.png", I got 2 in the corners, 3 along the edges and 4 in the interior. I got these results regardless of the image size.
Sorry, there was a screenshot attached, but this didn't work. Huh? For the moment there is a small image in my profile. Examples (all with yellow-draught.png) are as follows: cellsize=59 2333333332 3444444443 3444444443 3444444443 3444444443 3444444443 3444444443 3444444443 3444444443 2333333332 (the expected result) cellsize=60 2333233332 3444344443 3444344443 3444344443 2333233332 3444344443 3444444443 3444344443 3444344443 2333233332 (not the expected result) cellsize=61 cellsize=62 correct result cellsize=63 2333333332 3444444343 3443444343 3434334333 3444444343 3443444343 3444444443 2333333232 3444444343 2333333332 (wrong, but different from cellsize 60) cellsize=64 cellsize=65 cellsize=66 correct result cellsize=67 2333333322 3444434433 3323323322 3434434433 3434434433 3323323322 3444434433 3434434433 2323323322 2323323322 ??? Can anyone confirm this? Got the same results on a different machines. Tried Greenfoot 3.7.1., 3.8.x, 3.9.0 - all the same.
Update: game3
By Tuvshinzaya - about 12 hours ago
Update: game-3
By todbileg - about 12 hours ago
Update: game5
By Tuvshinzaya - about 12 hours ago
New Scenario: my first game
By Tuvshinzaya - about 12 hours ago
Update: game-1
By todbileg - about 12 hours ago
New Scenario: bear
By Tuvshinzaya - about 12 hours ago
New Scenario: crash houses
By unurjargal - about 12 hours ago
reply to Stopping a walking soundloop upon death
By danpost - about 13 hours ago
Sendaris8 wrote...
What do you mean by 'call this new method from wolf/bear classes'?
I mean add the "new method" above,
die()
, to your
Guy
class. Then you can use something like the following in the
Bear
and
Wolf
classes: <Code Omitted>
New Scenario: Pacman Escape
By dimitris.d4ll4s - about 19 hours ago
reply to Using an array switch to a new world
By danpost - about 20 hours ago
Looks like I missed one case world: <Code Omitted> And actually, the final range is 1 to 36 as 49 is the character code for '1' (not 48) which shifts everything up by 1. (48 is the character code for a '0' (zero)).
X
Comment on Tank Target Practice