#include <easyx.h>
#include <stdio.h>
const int WIDTH = 400;
const int HEIGHT = 760;
const int INTERVAL = 48;
IMAGE img_bk;
IMAGE img_item[3];
//加载图片
void loadImg()
{
loadimage(&img_bk, "images/bk.jpg", WIDTH, HEIGHT);
loadimage(img_item + 0, "images/cao.png",48,48);
loadimage(img_item + 1, "images/lingdang.png", 48, 48);
loadimage(img_item + 2, "images/shu.png", 48, 48);
}
int main()
{
initgraph(WIDTH, HEIGHT,EW_SHOWCONSOLE);
loadImg();
int map[3][3] = {0};
//初始化地图
for (int r = 0; r < 3; r++)
{
for (int c = 0; c < 3; c++)
{
map[r][c] = r+1; //1 2 3
}
}
//打乱数组
for (int r = 0; r < 3; r++)
{
for (int c = 0; c < 3; c++)
{
int r1 = rand() % 3;
i
《羊了个羊》游戏C语言版代码
最新推荐文章于 2023-01-31 02:24:24 发布