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

2014/3/14

Galton Board

ruetzka ruetzka

2014/3/14

#
Hey, is theire anybody who can program the Galton-Board in greenfoot?
elias.groll elias.groll

2014/3/14

#
Do u need physics? Without them its code is like 5 lines long :P
ruetzka ruetzka

2014/3/14

#
I know how the board functions, but I have no idea, how i can program it
elias.groll elias.groll

2014/3/14

#
Easiest way: u create two "Actor-objects", the ball( wich is just falling) and the obstacle wich decides if the ball has to be set to the right or left side ( with probability) of itself? :D now u build ur own world and create a new ball on top of it. Do u need this for school ?
ruetzka ruetzka

2014/3/20

#
Yes, it is my "project" in computer science. There must be 5 rows of obstacles, wer a ball get through. It will be perfect, if anybody can create the code for that, because my english is not the best :S
ruetzka ruetzka

2014/3/20

#
elias.groll wrote...
Easiest way: u create two "Actor-objects", the ball( wich is just falling) and the obstacle wich decides if the ball has to be set to the right or left side ( with probability) of itself? :D now u build ur own world and create a new ball on top of it. Do u need this for school ?
Yes, it is my "project" in computer science. There must be 5 rows of obstacles, wer a ball get through. It will be perfect, if anybody can create the code for that, because my english is not the best :S
elias.groll elias.groll

2014/3/25

#
So the easiest principle of a galton board is the decision of the balls next place (right || left). But i dont know wether u have to implement physics or an own random function. So if u dont know that either- ask ur teacher or implement it the way i told u. Just start your programm, post it here and i will help u (i promise). But i wont do ur homework mate :P PS: I saw that ure german(If ur profiles location is right) so we can talk in german if u want. -> Im also able to speak french & spanish if ure not from germany..
You need to login to post a reply.