Re: Coding a fruit machine

[ DelphiLand FAQ ]

Posted by DelphiLand Team on November 26, 2004 at 22:20:34:

In Reply to: Coding a fruit machine posted by Will on November 23, 2004 at 17:05:54:

: Hi,
: I am in my 3rd yr at university, i am at present doin my dissertation and the title is 'Code and Design a fruit machine' this i am doin in delphi, can you give me any tips or help where i can start or really anything.

We're not going to write the entire project for you, but here are some ideas:

- start by writing some specifications: how many fruits side-by-side (probably 3?), how many different fruits, what are the payouts for all winning combinations, and so on..
- make some .bmp drawings of the "fruit-images" that the machine should display;
- put references to the fruit-bmps in an array, let's say in aFruits from element 1 to element X;
- if you want for example to display three random images side-by-side, you generate three random numbers in the range from 1 to X and you display the corresponding array-elements from aFruits;
- for three fruits: make a 4 by X array of winning combinations, each containing the three winning fruit-numbers and the payout (put wildcards ? for "any fruit" in that position);
- write a scoring-algorithm;
- and so on...

Give it a try, and then ask us for help if you got stuck somewhere :)

Remember: DON'T start with coding before you've written at least some specifications :)

Good luck!
Guido, member DelphiLand Team

Related Articles and Replies

[ Delphi Forum -- by DelphiLand ]