Computer Science Canada making piece move |
Author: | Jickman [ Fri May 25, 2007 2:50 pm ] |
Post subject: | making piece move |
hi, me and a group of people have made a monoply game, and we have encounter a problem, we don't know how to make the piece move. ok u know each game has a dice right, we want the piece move to the coresponding roll, and for some reason it won't move, and also we want the piece to bounce back. question, can u show us how to make the piece move to the coresponding dice roll? (greatly thank u if u show us on hte program) ps. do u also know how to make the dice go randomly and stop at number , and u can do it again ( loop statement)? plz? ill so thank u !! plz help XD this program is just a sample if u can show me here =D |
Author: | Jickman [ Fri May 25, 2007 9:31 pm ] |
Post subject: | RE:making piece move |
HELP plz =D |
Author: | Expirant [ Fri May 25, 2007 9:43 pm ] | ||
Post subject: | Re: making piece move | ||
Wasn't sure exactly what you wanted, but I altered your dice code a little to get the circle to move to the appropriate square. Is this what you wanted to do?
|
Author: | Jickman [ Sat May 26, 2007 10:46 am ] |
Post subject: | RE:making piece move |
i have 1 more little question how do u make the dice display random number, and when u press a certrain letter it will stop? |
Author: | CodeMonkey2000 [ Sat May 26, 2007 11:02 am ] | ||
Post subject: | Re: making piece move | ||
I would do something like this:
|
Author: | Jickman [ Sat May 26, 2007 12:21 pm ] |
Post subject: | RE:making piece move |
u know that board right, how do u might it bounce back when it gets to square 10, if u roll a number 6, and ur on square 7, how do u make it bounce back ? |
Author: | CodeMonkey2000 [ Sat May 26, 2007 12:26 pm ] |
Post subject: | RE:making piece move |
You should check up on if statements. It's in the Turing Walkthrough |