out file for slot program?

For my semester project, our teacher wants us to make a slot machine program and he says we must use an out file. my question is what kind of out file do I need?
Text
I know but what would I put in that file?
A outfile is for storing results, a infile would be for determining odds(perhaps)

It would be defined by the project.
You might want to put
how much each person bet
the results of each game
total coins or $ amount in the slot
things like that

If you have to figure it out on your own, you want to know if your machine is winning or loosing, time of day your customers play and how much they bet/win. Depending on if it's a nickle, quarter or dollar slot, it might hold $500, 2500, or 5000 coins. If someone wins and there is not enough money you want to sound the alarm.
printf("\a""\a""\a");

Assume players money does not go into payout bucket, so you want to know how much is in the payout bucket and how much is in the Take.

When you start the game, it would read the last line of the outfile to determine how much it has in both buckets. If there is no output file, it would ask how much is in the bucket and create the file.

I would make it look like
11/15/2012 12:40:22.97 Bet, Score, Payout, $bucket, $Take

I would test it to make sure your machine makes a profit :) Otherwise you might get a F. The profit should be small, around 5%

Payouts might look like :
even money(should be common about 45%)
2x Bet 30%
3x 20%
5x 15%
10x 9%
25x 3%
100x 1%

modern slot machines use credits, so you put in a $100 bill you get 100 credits on a dollar machine. You could setup a menu to (A)dd credits (B)Bet one credit (C)ash out (M)Bet Max Credits.

Last edited on
Topic archived. No new replies allowed.