Name | Modified | Size | Downloads / Week |
---|---|---|---|
0.0.2 | 2011-04-12 | ||
0.0.1 | 2011-03-25 | ||
Version_history.txt | 2011-04-12 | 648 Bytes | |
README.txt | 2011-03-25 | 2.9 kB | |
Totals: 4 Items | 3.6 kB | 1 |
Lucky Fruit Author: eyecandy Contact: feel free to post a message on forums. About Lucky Fruit lucky fruit is a simple console-based slot machine game for windows. i wrote this program because i'm bored, and coding in c++ is some kind of my good time killer. i hope you learn something from this little program and its code. :D Contribution any form of, and any kind of contribution, help, or advise will be much appreciated. i'm pretty much noob in conding but it's very fun and interesting. so i always want to learn from other people. Main features *auto spin feature this feature allows the game to do as many automated spins as you want by computer. eg: 99999 spins! the speed is awesome, which is around 3000 spins per minute! this feature comes in handy when you change the payouts in the code, and want to analyze the result of P/O rate as an actual experiment(not the theoritical method by math caliculation). you can easily spin thousand times, by using this auto spin function. *using more sophisticated method of generating random numbers. almost everyone who want to seed random numbers uses "srand(time(0));" function. but the problem of this method is that it generates random nums only every second, that means it takes a second to genarate another(new) random numder. in ordinary program or game, this doesn't matter so much. but in Lucky fruit, it DOES because of the auto spin function. to make automated spins so fast, you need to generate random numbers so fast. at least, once in every second is WAY too long to wait for the modern CPU. if i used normal srand(time(0)); method, 3000 spins per minute wouldn't be possible. *using sound effects. well, i don't have much to say here... Commands(controls) H =help T =show pay table Q =quit the game B =bet M =Max bet (20 bets) N =Rebet I =add credits O =equivarent of "PAYOUT" button of real slot machine. ats =bring up the auto spin wizard stat =view the game statistics eg: P/O rate fstat =format the statistics: erasing all the game statistics. Pay table wm = Water mellon pl = Plum or = Orange ch = Cherry 777x3 1000xbet BARx3 200xbet bellx3 100xbet wmx3 30xbet plx3 20xbet orx3 15xbet chx3 7xbet chx2 2xbet Specification *3 reels *each reel has: 25 symbols Math(P/O stuff) total 25^3= 15625 payout rate= 91.2064% = 14251 symbols= 7, plum, bar, orange, cherry, bell, water mellon r1 r2 r3 7 1 1 1 ba 2 2 2 be 3 3 3 wm 5 5 5 pl 4 4 4 or 4 4 4 ch 6 6 6 Probabilities 7 = 1/15625 bar = 8/ wm = 125/ pl = 64/ or = 64/ ch = 216/ chx2 = 720/ Paytable 777x3 1000x1 =1000 BARx3 200x8 =1600 bellx3 100x27 =2700 wmx3 30x125 =3750 plx3 20x64 =1289 orx3 15x64 =960 chx3 7x216 =1512 chx2 2x720 =1440 total =14251/15625 P/O =91.2064% -----------