原创的C语言控制台小游戏概要
原创的C语言控制台小游戏
本文给大家分享的是个人原创设计的一个C语言控制台小游戏,非常的简单,但是挺好玩的,推荐给大家,有需要的小伙伴也可以自由扩展下。
最开始左上色块被感染,通过切换颜色,不断感染同色色块。亮点是可以切换图案,设置方块个数和最大限制次数。整体还是比较满意,希望大神指教。
#include stdio.h
#include windows.h
#include conio.h
#include time.h
#include stdlib.h
int DIFFICULT=44;
int count=0 ;
int TYPE_SHAPE=2 ;
int flag=7 ;
int LINE=12;
struct MyStruct
{
int shape ;
int color ;
int infect ;
};
void SetColor(unsigned short ForeColor,unsigned short BackGroundColor)
{
HANDLE hCon=GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hCon,ForeColor|BackGroundColor);
}
void WelcomeScr()
{
int i;
printf(\n\n\n\t\t);
printf(●程
原创力文档

文档评论(0)