|
1 | | -<<<<<<< HEAD |
2 | | -/* |
3 | | - * 作者:c-cpp-a(Github) |
4 | | - * 最近更新:2024/1/28 |
5 | | - * 功能简述:这是整个游戏的主体部分,负责运行游戏。 |
6 | | - */ |
7 | | -/* |
8 | | - * Author: c-cpp-a(Github) |
9 | | - * Last updated: 2024/1/28 |
10 | | - * Function description: This is the main part of the whole game, responsible for running the game. |
11 | | - */ |
12 | | -//include STL |
13 | | -//导入标准库 |
14 | | -#include<windows.h> |
15 | | -#include<stdlib.h> |
16 | | -#include<direct.h> |
17 | | -#include<string> |
18 | | -//include custom library |
19 | | -//导入自定义库 |
20 | | -#include "include_files.h" |
21 | | -using namespace std; |
22 | | -int main(int argc,char ** argv){ |
23 | | - //Instantiate Object |
24 | | - //实例化对象 |
25 | | - Map G; |
26 | | - People p(false); |
27 | | - Egg egg; |
28 | | - Screen screen(egg,G,p,false,argc,argv); |
29 | | - //init(p,G,egg,argc,argv);//调用初始化函数(Call initialization function) |
30 | | - //游戏循环(Game cycle) |
31 | | - //游戏的刷新速度约为100次/秒(Running speed of the game is about 100 ticks/second) |
32 | | - while(true){ |
33 | | - screen.save();//保存游戏 |
34 | | - egg.check_run(screen.get_data().lang,p,G);//检测是否触发彩蛋(Check whether the egg is triggered) |
35 | | - ::ShowCursor(false); |
36 | | - G.print(p.get_pos().x,p.get_pos().y,p.get_movef(),screen);//输出(print) |
37 | | - ::screen_helper(screen.get_data().lang);//提供帮助(Help) |
38 | | - if(egg.is_ach()) egg.print_ach();//如果触发了成就系统,就运行输出成就(If the achievement system is triggered, run the output achievement) |
39 | | - Sleep(10);//游戏的刷新时间 |
40 | | - char ch=getch(); |
41 | | - if(ch==27) break; |
42 | | - p.move(G,egg,screen,ch);//输入(input) |
43 | | - } |
44 | | - return 0; |
45 | | -} |
46 | | - |
47 | | -======= |
48 | 1 | /* |
49 | 2 | * 作者:c-cpp-a(Github) |
50 | | - * 最近更新:2023/5/21 |
| 3 | + * 最近更新:2024/1/28 |
51 | 4 | * 功能简述:这是整个游戏的主体部分,负责运行游戏。 |
52 | 5 | */ |
53 | 6 | /* |
54 | 7 | * Author: c-cpp-a(Github) |
55 | | - * Last updated: 2023/5/21 |
| 8 | + * Last updated: 2024/1/28 |
56 | 9 | * Function description: This is the main part of the whole game, responsible for running the game. |
57 | 10 | */ |
58 | 11 | //include STL |
@@ -90,4 +43,3 @@ int main(int argc,char ** argv){ |
90 | 43 | return 0; |
91 | 44 | } |
92 | 45 |
|
93 | | ->>>>>>> 08ecd9bcff0acb77ac9636ec42c1a85e6f8ca663 |
0 commit comments