求合作
  • 板块灌水区
  • 楼主吴明事
  • 当前回复4
  • 已保存回复4
  • 发布时间2021/11/20 17:09
  • 上次更新2023/11/3 23:59:18
查看原帖
求合作
378914
吴明事楼主2021/11/20 17:09

求一起编头文件game,专注于编辑有关游戏的模块,感兴趣的私信,谢谢!

以下代码为目前30分钟出来的成果

#include<bits/stdc++.h>
#include<windows.h>
#include<conio.h>
#include<string>
#define square ■
#define triangle ▲
#define hollow_square □
#define hollow_triangle △
#define circle ●
#define hollow_circle ○ 
using namespace std;
string to_string(int val){
	string ret("");
	for(int i=0;val!=0;i++){
		int x=val%10;
		val/=10;
		ret+=x+'0';
	}
	reverse(ret.begin(),ret.end());
	return ret;
}
class game{
	public:
		void close(void){
			exit(0);
		}
		void bad_close(void){
			exit(2147483647);
		}
		void set_window_size(const int cols,const int lines){
			string s="mode con cols="+to_string(cols)+" lines="+to_string(lines);
			system(s.data());
		}
		void slow_display(const char* text,const int space){
			int l=strlen(text);
			printf("%c",text[0]);
			for(int i=1;i<l;i++){
				Sleep(space);
				printf("%c",text[i]);
			}
		}
		void set_title(string title){
			string s="title "+title;
			system(s.data());
		}
};
2021/11/20 17:09
加载中...