/*
开发: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