文件名称:mine-sweeping
-
所属分类:
- 标签属性:
- 上传时间:2012-12-07
-
文件大小:835byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
模拟“扫雷”游戏规则,随机生成地雷分布位置,输出雷区分布图.
主要思路:用随机函数生成表示地雷分布的二维数组。
将二维直角坐标系与二维数组结合,用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
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.