Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions .github/workflows/c-cpp.yml

This file was deleted.

74 changes: 0 additions & 74 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

Binary file added main/Maps.exe
Binary file not shown.
90 changes: 90 additions & 0 deletions main/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# My-Map
## 注意事项
This version is for Windows only. Chinese output or comments may be garbled, so feedback or transcoding can be performed (code usage code: GB2312).

此版本只适用于Windows。中文的输出或注释可能出现乱码,可以进行反馈或转码(代码使用编码:GB2312)。

Because the window size is limited, the pop-up version is introduced. Please refer to pop window version.

因为窗口大小受限,所以推出了弹窗版本,请看pop-window-version。

## 版本

### V1.0
This is a new Sandbox game. You can create or destroy rocks here, and you can walk freely. More functions are under development.

这是一个新的沙盒游戏。你在这里可以创建或销毁岩石,也可以自由行走。更多功能开发中。

### V1.1
The new portal function can easily reach remote places.

新增传送门功能,可以方便地到达遥远之地。

### V1.2
Added the function of importing and exporting documents.

新增导入导出文档功能。

### V1.3.A

Add small balls; Discard the archive function and stop providing it until the bug is fixed.

新增小球;弃用存档功能,在修复好bug之前不再提供。

### V1.3.B

Fix the bug that the ball does not update, and make changes to the screen related help.

修复小球不更新的bug,并对屏幕相关帮助作出更改。

### V2.0

New eggs. Please explore or consult the code yourself.

新增彩蛋。请自行探索或查阅代码。

### V2.1.0

Expand the egg of the previous version and add new achievements. Add language menu option.

对上一版本的彩蛋进行扩充,新增成就。新增语言菜单选项。

#### V2.1.1

Optimization of some details.

一些细节的优化。

#### V2.1.2

Optimization of some details.

一些细节的优化。

#### 2022/11/8:

合并pop-window-version为main分支。

Merge pop-window-version into main branch.

### V2.2.0

New mode settings: normal mode and developer mode.

新增模式设置:普通模式和开发者模式。

#### V2.2.1

1. New mode setting: Hell mode.

2. Functional comments are provided for part of the code.

1、新增模式设置:地狱模式。

2、为部分代码提供了功能注释。

#### V2.2.2

Modification of some details.

一些细节的修改。
93 changes: 93 additions & 0 deletions main/defines/Eggs.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
int Egg::isegg(const int &lang,People &p,Map &h){
if(lang==English &&
h[EGG_POS[English][0][0]][EGG_POS[English][0][1]]==rock){
has_ach=true;
system(("mode "+to_string(COLS+ADD_COLS)+","+to_string(LINES+ADD_LINE)).c_str());
} else if(lang==Chinese &&
p.at(EGG_POS[Chinese][0][0],EGG_POS[Chinese][0][1])==
People::node(EGG_POS[Chinese][0][0],EGG_POS[Chinese][0][1])
&& p.get_pos().x==EGG_POS[Chinese][0][0] && p.get_pos().y==EGG_POS[Chinese][0][1]) return CHI_egg_1;
else if(lang==unable &&
p.get_pos().x==EGG_POS[unable][0][0] && p.get_pos().y==EGG_POS[unable][0][1]
&& h[EGG_POS[unable][0][0]][EGG_POS[unable][0][1]]==ball
&& p.move_f==rights) return UNABLE_egg_1;
return empty_egg;
}
void Egg::check_run(const int &lang,People &p,Map &h){
system("CLS");
switch(isegg(lang,p,h)){
case CHI_egg_1:
{
achs[6]=true;
::print("��ϲ���������˲ʵ���\n");
::print(">>>");
string s;
while(getline(cin,s) && s!="quit"){
if(s=="creater"){
::print("c_cpp_a,Github��ַ:www.github.com/c-cpp-a/My-Map\n");
} else if(s=="lgker"){
::print("��������ϲ�����������صIJʵ���\n����˺ţ�c_cpp_a�����UID��346332��\n");
} else if(s=="Snake"){
::print("����̰������Ϸ�С���\n");
Sleep(1000);//�������Ժ��ٲ�
::print("����ʧ�ܣ�\n");
} else{
::print("�Բ���������IJ����κ�ָ�\n");
}
::print(">>>");
}
::print("���˳���");
}
break;
case UNABLE_egg_1:
{
achs[7]=true;
::print("��ϲ���������˲ʵ���\n");
::print("Congratulations, you found the egg!\n");
::print("<<<");
string s;
while(getline(cin,s) && s!="quit"){
if(s=="D o D o oooo"){
::print(s);
::print("\nͦ���������ʵ������ҵ��ˣ�\n");
::print("Very good. It's hard to find this egg!\n");
::print("�ʵ���ʾ�����ġ�10�������š�\n");
::print("Egg tips: Chinese, 10. Transmission gate.\n");
} else{
::print(s);
::print("\n");
}
::print("<<<");
}
}
}
}
void Egg::print_ach(){
auto y=0;
y=ach_print("achievement",y);
if(achs[0]){
y=ach_print("1.creat your first floor.",y);
}
if(achs[1]){
y=ach_print("2.creat your first rock.",y);
}
if(achs[2]){
y=ach_print("3.creat your first portal.",y);
}
if(achs[3]){
y=ach_print("4.creat your first ball.",y);
}
if(achs[4]){
y=ach_print("5.first access to the portal",y);
}
if(achs[5]){
y=ach_print("6.move your ball the first time.",y);
}
if(achs[6]){
y=ach_print("7.found Chinese egg 1.",y);
}
if(achs[7]){
y=ach_print("8.found [unable] Egg 1.",y);
}
}

27 changes: 27 additions & 0 deletions main/defines/Eggs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#ifndef EGGS_H_
#define EGGS_H_
//include STL
//�����׼��
#include<string>
#include<iostream>
//include custom library
//�����Զ����
#include "def"
class People;
class Map;
class Egg{
private:
bool has_ach=false;
bool achs[10]={};
public:
int isegg(const int &,People &,Map &);
void check_run(const int &,People &,Map &);
void print_ach();
inline bool is_ach(){
return has_ach;
}
inline bool &operator[](size_t i){
return achs[i];
}
};
#endif
Loading