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

danpost's Comments

Back to danpost's profile

@darkmist255, did you click on 'Run'? I may have to revert back to what I had uploaded previously if you did and some others find that they cannot see the pieces either.
If you click on 'Run', you will see the board with the pieces.
Can anyone guess or figure out where I got the new piece images from?
What would be cool is if the snow landed on other snow it takes longer to melt and the more snow that has landed make the background slowly brighten to show some scenery.
Upload the scenario while the biggest world is showing. My only thought is that with more pins, should not the user be allowed more guesses (as even 5 pins is almost impossible, as is)?
The easy fix for the wall-hugging problem is using a double condition as follows: if (ySpeed > 0 && getX() > getWorld().getHeight() - 11) ySpeed = -ySpeed; if (ySpeed < 0 && getX() <= 11) ySpeed = -ySpeed; Of course, I chose 11 as an arbitrary number and you should adjust it to the appropriate value for the size of your ball. The two statements can be combined into one larger 'if' by wrapping each set of conditions in parenthesis and ORing them together. if ((ySpeed > 0 && getX() > getWorld().getHeight() - 11) || (ySpeed < 0 && getX() <= 11)) ySpeed = -ySpeed;
You could allow all four keys 'w', 'a', 's', and 'd' active for the one player and all four of the arrow keys active for the other player. Just use something like [code]if (Greenfoot.isKeyDown("w") || Greenfoot.isKeyDown("a"))[/code]for each combination of keys (I am not sure if those two particular keys are a matching combination of keys; I was just trying to show the code format here).
@jhadad, start a new discussion on this and explain exactly what you are trying to do (what you [i]want[/i] to happen), as well as what is currently happening. Also, supply the code in question. The more specific and detailed you are the better to reach a working solution quickly.
danpostdanpost

2012/9/13

To fix the hour hand, just add a degree to its rotation every 2 minutes (instead of 30 degrees every hour).