Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   Works-In-Progress (http://www.alice.org/community/forumdisplay.php?f=14)
-   -   Cowboys, Ballerinas and Math (http://www.alice.org/community/showthread.php?t=4259)

choppa1890 04-18-2010 10:56 PM

Cowboys, Ballerinas and Math
 
Hello, I'm pretty new to the community, but i really need some help with a project.

I'm doing a multiplication math game, two cowboys challenge each other to a showdown and the "good" cowboy wins because he gets the correct answer for a multiplication problem, or loses if he gets it wrong. Same with the ballerina, she jumps, spins and moves around whenever she gets a right answer, and stays in place or falls if she gets it wrong.

The thing i need help on is storing the number that can be accessed for said multiplication problems. It is basic time tables (the game is for 6yr olds+) so i need to store the numbers 1 through 10 and have alice access them randomly. 1 problem could be 3X2, the next problem could be 5X4, etc. I was wondering what is it that i have to do to achieve something like that? I already know i can ask input from the player, i just wanna know how to set up the numbers so they can be accessed and placed together in a multiplication problem.

Thank you.

bjia56 04-19-2010 09:38 PM

Have you considered using a random number function? You could use two numerical variables and set random numbers to each, then ask for the <insert mathematical operation here> of the two numbers.

Did that help, or was that totally not what you wanted?


All times are GMT -5. The time now is 09:20 PM.

Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.