Skip to content

Commit c5e4f77

Browse files
committed
Push
1 parent 7a82ab6 commit c5e4f77

File tree

7 files changed

+52
-38
lines changed

7 files changed

+52
-38
lines changed

docs/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ Made by LanGong Development Team
3232
- Others : other
3333
- [x] MacOS : other
3434

35+
## Warning
36+
37+
npm and yarn are not available to use.
38+
3539
# Feedback 反馈
3640

3741
Issues

docs/install.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
# Install 安装
22

3+
## Your system 查看你的系统适合那个
4+
5+
- AUR : ArchLinux, ArcoLinux, ManjaroLinux
6+
- dpkg : DebianLinux, UbuntuLinux
7+
- Others : Any-Linux, MacOS
8+
39
## By AUR (ArchLinux) 通过aur安装
410

5-
```bash
11+
```
612
$ yaourt -S zff ## you can also use other app, like yay, pacaur...
713
```
814

@@ -12,13 +18,13 @@ Download `zff-*.deb` from releases page.
1218

1319
从下载(releases)页面下载 `zff-*.deb`
1420

15-
```bash
21+
```
1622
# dpkg -i zff-deb.deb
1723
```
1824

1925
## Others 其他
2026

21-
```bash
27+
```
2228
$ git clone https://github.com/ohzff/Zff
2329
$ cd Zff
2430
# bash install.sh

docs/test.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/update.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,14 @@
22

33
## DEB and Other
44

5-
```bash
5+
```
66
$ cd /usr/share/ohzff-zff
77
# git pull
88
# g++ zff_main_en.cpp -o /usr/bin/zff
99
```
1010

11-
## npm
12-
13-
```bash
14-
$ cd /usr/lib/node_modules/langong-zff
15-
# git pull
16-
# g++ zff_main_en.cpp -o zff
17-
```
18-
1911
## Aur users
2012

21-
```bash
22-
yaourt -Syu
13+
```
14+
$ yaourt -Syu
2315
```

docs/usage.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
## Add user 添加用户
44

5-
```bash
5+
```
66
$ zff init
77
```
88

99
## Run 运行
1010

11-
```bash
11+
```
1212
$ zff
1313
```
1414

@@ -23,8 +23,7 @@ We have these two mod/branch.
2323
>
2424
> 我们不知道dev分支是否会伤害您的电脑,所以请您慎重考虑后在切换分支。
2525
26-
```bash
27-
## AUR, DEB, Other
26+
```
2827
$ cd /usr/share/ohzff-zff
2928
3029
# git pull

zff

4.07 KB
Binary file not shown.

zff_main_en.cpp

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,34 @@ typedef const char cc;
2929
typedef const double cd;
3030
// int kfd = 0;
3131
// struct termios cooked, raw;
32+
//
33+
//
34+
//
35+
36+
37+
void printlogo()
38+
{
39+
printf (" __________ _________ _________\n / \\ / \\ / \\\n \\_______ / | ______/ | ______/\n / / | / | /\n / / | \\______ | \\______\n / / | \\ | \\\n / / | ______/ | ______/\n / / | / | /\n / / | | | |\n / / | | | |\n / \\______ | | | |\n | \\ | | | |\n \\__________/ \\__/ \\__/\n\n Zff game is made by LanGong Development Team.\n");
40+
}
41+
42+
43+
3244
cc fu='F',you='H';
3345
cc winok[10][100] = {
3446
"Excellent",
3547
"Great",
3648
"Well done",
3749
"Good",
38-
"Wonderful"
50+
"Wonderful",
51+
"Perfect"
52+
};
53+
cc ebox[20][250] = {
54+
"",
55+
" ---------- Error 1: Out ----------\n",
56+
" ---------- Error 2: Install error ----------\n",
57+
" ---------- Error 3: Start game error ----------\n",
58+
" ---------- Error 4: Input error ----------\n input again.\n",
59+
" ---------- Error 5: User not found ----------\n run 'zff init' to fix.\n"
3960
};
4061
int tr,kd,fx,fy,hx,hy,s=0;
4162
int sysE;
@@ -99,8 +120,8 @@ int win ()
99120
{
100121
putlevel(level+1);
101122
system("clear");
102-
int rcc = rand() % 5;
103-
printf("%s! Your new level is: %d\nPlay again? [Again : Enter / quit : q ]\n",winok[rcc],level+1);
123+
int rcc = rand() % 6;
124+
printf(" %s! Your new level is: %d\n Play again? [Again : Enter / quit : q ]\n",winok[rcc],level+1);
104125
while(1){
105126
int r=check(keyboard());
106127
if(r==9)return 0;
@@ -215,10 +236,10 @@ int start(){
215236
//system("clear");
216237
//printf(" Zff \n\n\n\n\n\n\n\n\n\n Welcome!\n");
217238
//sleep(3);
218-
printf (" __________ _________ _________\n / \\ / \\ / \\\n \\_______ / | ______/ | ______/\n / / | / | /\n / / | \\______ | \\______\n / / | \\ | \\\n / / | ______/ | ______/\n / / | / | /\n / / | | | |\n / / | | | |\n / \\______ | | | |\n | \\ | | | |\n \\__________/ \\__/ \\__/\n");
239+
printlogo();
219240
if(level==-1||getboot()!=1){
220241
//maken();
221-
printf ("------Err5: User not found! ------\n >> Input 'zff init' to add user\n");
242+
printf ("%s", ebox[5]);
222243
exit (-5);
223244
}
224245
//system("clear");
@@ -252,7 +273,7 @@ int game(){
252273
}
253274
cout<<endl;
254275
}
255-
printf("\nUse 'UP''DOWN''LEFT''RIGHT' to contral 'H' to catch 'F'\nPress 'R' to restart game,\nPress 'Q' to quit game\n");
276+
printf("\n Use 'UP''DOWN''LEFT''RIGHT' to contral 'H' to catch 'F'\n Press 'R' to restart game\n Press 'Q' to quit game\n");
256277
int r=check(keyboard());
257278
// printf("%d\n",r);
258279
// sleep(1);
@@ -267,7 +288,7 @@ int game(){
267288
}
268289
if(r!=1 && r!=2 && r!=3 && r!=4 && r!=0 && r!=27){
269290
system("clear");
270-
printf("------ERR4: Input Error, Pleese Input Again------\n");
291+
printf("%s",ebox[4]);
271292
//printf("%d",r);
272293
//sleep(0.1);
273294
syscls();
@@ -277,7 +298,7 @@ int game(){
277298
//move
278299
system("clear");
279300
if(hx+nx[r]<=1||hx+nx[r]>n-1||hy+ny[r]<=1||hy+ny[r]>n-1){
280-
printf("----------ERR1: Out----------\n");
301+
printf("%s", ebox[1]);
281302
//sleep(0.1);
282303
continue;
283304
}
@@ -412,16 +433,17 @@ void findpalse(){
412433

413434
void goodbye(){
414435
system("clear");
415-
if (display_log) printf (" >> Exit\n");
416436
//system ("rm -rf ~/.local/share/ohzff-zff && mv zffcc ~/.local/share/ohzff-zff");
437+
printlogo();
438+
printf("\n Exit Zff game.\n");
417439
sleep(1);
418440
system("clear");
419441
}
420442

421443
void ready ()
422444
{
423445
if(start()){
424-
printf("--------ERR3: Start Error--------\n");
446+
printf("%s", ebox[3]);
425447
//return 3;
426448
exit(3);
427449
}
@@ -457,7 +479,7 @@ int main(int argc, char* argv[]){
457479
}
458480
else
459481
{
460-
printf ("------ERR4: Input Error, Please Input again! ------\n");
482+
printf ("%s", ebox[4]);
461483
return 4;
462484
}
463485
sleep(1);

0 commit comments

Comments
 (0)