-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTajaGame.h
More file actions
127 lines (62 loc) · 1.79 KB
/
TajaGame.h
File metadata and controls
127 lines (62 loc) · 1.79 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#ifndef _GAME_H_
#define _GAME_H_
#include <fcntl.h>
#include <iostream>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#include <string>
#include <list>
#include <termios.h>
#include <stdio.h>
using namespace std;
#define SIZE_READ_TEXT_ENG 70 + 3
#define SIZE_READ_TEXT_HNG 101
#define SELECT_ENGLISH 1
#define SELECT_HANGUL 2
#define SCOREFILE "./userscore.dat" // added
class Game {
private:
int select =0;
char pathName[20] ={'\0',};
char put_String_E[SIZE_READ_TEXT_ENG] = {'\0', };
char Buf_E[SIZE_READ_TEXT_ENG] = { '\0',};
char err_Type_E[SIZE_READ_TEXT_ENG] = { '\0', };
char put_String_H[SIZE_READ_TEXT_HNG] = {'\0',};
char Buf_H[SIZE_READ_TEXT_HNG] = {'\0',};
char err_Type_H[SIZE_READ_TEXT_HNG]={'\0',};
int total_typenum = 0; //타이핑되는 총 글자수 입력 (공백 포함)
int err_typenum = 0;
float accuarcy = 0.0;
int type_start_Time;
int type_during_Time;
list<string> English={"명언","명언2","명언3"};
list<string> Hangul={"이별택시","자화상"};
list<string> Text_Mode;
list<string>::iterator iter;
char curText[10];
char userName[10];
public:
int basicgame();
int Return_ErrTypeNum(char Buf[], char put_String[], int str_Size);
void Remove_Enter(char put_String[], int len);
void Print_Result();
char* Print_TextList(int select);
};
// added part started
static int fd;
static int w_Size;
static int r_Size;
typedef struct UserScore {
char name[10];
double spd;
double accuracy;
char text[10];
} UserScore;
void readScore();
void move_right_one(UserScore** arr, int ind, int curIndex);
// added part finished
#endif