[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LOGO-L> Dice and code



Hi thanks for replying Frank and Marian sorry here is the code

to roll
t2, setsh 1
make "play1 int (random 6) + 1
setsh :play1
end

to dice
repeat 5 [roll wait 2]
end

to git
repeat 5 [t3, setsh 1
make "play2 int (random 6) + 7
setsh :play2 wait 2]
end

to gkt
repeat 5 [t1, setsh 1
make "play3 int (random 6) + 13
setsh :play3 wait 2]
end

to start
launch [dice]
launch [gkt]
launch [git]
end

Frank Caggiano wrote:

> Without seeing the code it's tough to comment or suggest a solution.
>
> Generally you will need to keep track of the number selected and then
> reject that number if it's selected again.
>
> It sounds as if all three faces are being selected randomly each time
> the 'die is thrown'.  This would be incorrect, however.  The way the die
> lays out once one face is known the other faces can only have certain
> values.  Once two faces are know then the other faces must have certain
> values.
>
> regards
>
> --
> Frank Caggiano
> caggiano@atlantic.net
> http://www.atlantic.net/~caggiano
> ---------------------------------------------------------------
> Please post messages to the Logo forum to logo-l@gsn.org.  Mail
> questions about the list administration to logofdn@gsn.org.  To
> unsubscribe send    unsubscribe logo-l    to majordomo@gsn.org.



---------------------------------------------------------------
Please post messages to the Logo forum to logo-l@gsn.org.  Mail
questions about the list administration to logofdn@gsn.org.  To
unsubscribe send    unsubscribe logo-l    to majordomo@gsn.org.



Global SchoolNet Foundation - Linking Kids Around the World!
Copyright GSN - All Rights Reserved - Comments & Questions
Visit GSN's Global Schoolhouse for more exciting learning resources!
Search our Site - Home