文件名称:mine-sweeping
介绍说明--下载内容均来自于网络,请自行研究使用
模拟“扫雷”游戏规则,随机生成地雷分布位置,输出雷区分布图.
主要思路:用随机函数生成表示地雷分布的二维数组。
将二维直角坐标系与二维数组结合,用x轴上0-9的整数表示二维数组的列数,用y轴上0-9的整数表示二维数组 的行数,用随机函数分布生成x,y的值,以此确定地雷的准确位置。
-Analog " mine" the rules of the game, randomly generated mines location of the output minefield maps main idea: using the random function to generate two-dimensional array of mine distribution. Binding the two-dimensional Cartesian coordinate system, and two-dimensional array, an integer of 0-9 with the x-axis represents the number of columns of the two-dimensional array, an integer of 0-9 with the y-axis represents the number of rows of the two-dimensional array, with the distribution of random function the values of x, y is generated in order to determine the exact location of the mines.
主要思路:用随机函数生成表示地雷分布的二维数组。
将二维直角坐标系与二维数组结合,用x轴上0-9的整数表示二维数组的列数,用y轴上0-9的整数表示二维数组 的行数,用随机函数分布生成x,y的值,以此确定地雷的准确位置。
-Analog " mine" the rules of the game, randomly generated mines location of the output minefield maps main idea: using the random function to generate two-dimensional array of mine distribution. Binding the two-dimensional Cartesian coordinate system, and two-dimensional array, an integer of 0-9 with the x-axis represents the number of columns of the two-dimensional array, an integer of 0-9 with the y-axis represents the number of rows of the two-dimensional array, with the distribution of random function the values of x, y is generated in order to determine the exact location of the mines.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
mine sweeping.cpp