2024年6月14日发(作者:)
C语言程序设计 :扫雷TC语言程序
#include
#include "stdlib.h"
# include "time.h"
# define s 20
int x; /*棋盘行数*/
int y; /*棋盘列数*/
int b; /*选择游戏难度 1简单2普通3困难4 自定义*/
int h; /*雷的个数*/
struct Games g;
struct Games
{
int game_int[s][s];
char game_char[s][s];
};
void InitialValue_game(struct Games *g)
/*棋盘初始化*/
{
int i,j;
for(i=0;i { for(j=0;j { (*g).game_int[i][j]=0; (*g).game_char[i][j]='#'; }
发布评论