VisualStdio-2019&&easyx—>实现2048小游戏制作

​​​​​​​

/*
开发:VS2019+easyx;
项目:2048;
参数:4*4网格、宽度100、间隔15、
background:RGB(187, 173, 160)
*/
#undef UNICODE
#undef _UNICODE
#include<stdio.h>
#include<conio.h>
#include<graphics.h>  //图形库头文件
#define max_grid 4  //行格子数
#define grid_width 100  //格子宽度
#define interval 15  //间隔
enum Color  //格子颜色RGB
{
	zero = RGB(205,193,180),  //0
	twoto1 = RGB(238,228,218),  //2
	twoto2 = RGB(237,224,200),  //4
	twoto3 = RGB(242, 177, 121),  //8
	twoto4 = RGB(245, 149, 99),  //16
	twoto5 = RGB(246, 124, 95),  //32
	twoto6 = RGB(246, 94, 59),  //64
	twoto7 = RGB(242, 177, 121),  //128
	twoto8 = RGB(237, 204, 97),  //256
	twoto9 = RGB(255, 0, 128),  //512
	twoto10 = RGB(145, 0, 72),  //1024
	twoto11 = RGB(242, 17, 158),  //2048
	back = RGB(187,173,160),  //background
};
Color arr[13] = { zero,twoto1,twoto2,twoto3,twoto4,twoto5,twoto6,twoto7,twoto8,twoto9,twoto10,twoto11,back };  //枚举数组绘图
int num[12] = { 0
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值