PDA

View Full Version : Board Game



BORKOYz
October 16th, 2005, 10:31 AM
does n e 1 know where i can find a board game tutorial or know how to make 1 coz i need to make 1 for skool

mathew.er
October 16th, 2005, 11:35 AM
Please, translate your post to english and explain what do you mean by a board game...

BORKOYz
October 18th, 2005, 11:41 AM
Please, translate your post to english and explain what do you mean by a board game...

a board game like, when you roll dice you move up the number you rolled then when you land on a square it will ask a question, that kind board game.

GPP
October 19th, 2005, 12:31 AM
You can use artificial intellegence and random numbers to roll the die.

GPP
October 19th, 2005, 12:35 AM
Example

diceroo = Math.ceil(Math.random()*60);
if(diceroo >= 0 && diceroo < 10) {
d1 = 1
trace ("Dice: "+d1)
}
else if(diceroo >= 10 && diceroo < 20) {
d1 = 2
trace ("Dice: "+d1)

}
else if(diceroo >= 20 && diceroo < 30) {
d1 = 3
trace ("Dice: "+d1)
}
else if(diceroo >= 30 && diceroo < 40) {
d1 = 4
trace ("Dice: "+d1)
}
else if(diceroo >=40 && diceroo < 50) {
d1 = 5
trace ("Dice: "+d1)
}
else if(diceroo >=50 && diceroo < 60) {
d1 = 6
trace ("Dice: "+d1)
}

Barn
October 19th, 2005, 12:41 AM
That seems unnecessarily complex to me.


// two dice: d0 and d1
d0 = Math.floor(Math.random()*6)+1;
d1 = Math.floor(Math.random()*6)+1;