-
Notifications
You must be signed in to change notification settings - Fork 1
/
slotmachine.h
50 lines (44 loc) · 1.25 KB
/
slotmachine.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef SLOTMACHINE_H_INCLUDED
#define SLOTMACHINE_H_INCLUDED
#define PROGRAM_NAME "Crazy Eights Slot Machine"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <fcntl.h>
#if !defined(_MSC_VER) && !defined(WIN32)
#include <unistd.h>
#endif
#include <time.h>
#include <ctype.h>
#include "numbers.h"
#include "OpenDoor.h"
#include "version.h"
struct PlyrRec {
int Index;
char Name[32];
int Score;
};
struct PlyrRec Plyr;
char PlyrFile[15]="player.dat";
void slot(int* ax, int* bx, int* cx, int* dx);
void slotPrint(int sum, int bet, int s1, int s2, int s3, int s4, int winPrint);
int bidMaker(int sumT);
int slotWinning(int s1, int s2, int s3, int s4, int betA, int* winSum);
int sumStart(void);
char* goldconvert(int x);
int findtotaldigits(unsigned long int no);
void insert_substring(char *a, char *b, int position);
char *substring(char *string, int position, int length);
void gameExit(int errorlevel);
void add_player_idx();
int get_player_idx();
int load_player();
int scan_for_player(char *username, struct PlyrRec *Plyr);
void SavePlyr();
void SaveUser();
int get_total_idx();
void centerText(char *text, int fieldWidth);
void bubble_sort(struct PlyrRec list[80], int s);
char comma[20];
#endif // SLOTMACHINE_H_INCLUDED