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

danpost's Comments

Back to danpost's profile

Maybe I should limit that choice to those direction that lead cars out of the world. That would help clear the central area instead of congesting it.
First, I would need a way to determine that a traffic jam exists. But, I do not want to just make them turn to alleviate the problem. I would want them to find a way to continue through regardless (I think the turning would be sort of a cheat and not a work-around). Maybe randomly pick which way should continue first and let all those going that direction through. Then, hopefully, the problem will be cleared up enough for normal procedures.
I see. Your description says 'space' to fire and the code uses 'shift'. That is what was throwing me.
Yes, that is called a traffic jam. It happens sometimes during rush hour. Either that or the drivers are too polite to go first! I will work on a 'work-around' on that. But, it will not be that easy.
Did you forget to 'Save the world'? After adding your actors into the world, go to the menubar and select "Controls>Save the World" to save the additions. Then upload this again.
I think the keystrokes are being consumed by one player and the other player will not be able to fire. This is probably the case if you are using the 'getKey' method instead of 'isKeyDown' method.
Finally, a level 7 completed! Getting outrageously difficult.
@Entity1037, I have also gotten to level 7 (6 levels completed means score of 6); but, no further (as yet). Good job.
I missed a closing parenthesis at the end of this line above: if (isTouching(ClassName.class))