检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
机构地区:[1]厦门理工学院,福建厦门361024 [2]沈阳工业大学,沈阳110023
出 处:《齐齐哈尔大学学报(自然科学版)》2014年第1期1-5,24,共6页Journal of Qiqihar University(Natural Science Edition)
基 金:厦门理工学院科学技术研究项目(YKJ11012R;YKT10037R);国家自然科学基金项目(61103246);厦门理工学院创新创业园项目(201311062062)
摘 要:在Eclipse平台上,选择Java语言完成迷宫游戏的设计与开发。采用随机布点算法生成不规则迷宫地图,采用图的深度优先遍历算法随机生成规则地图。在相同的窗口,运用地图格的大小不同来生成较低、中等、较高三种不同难度的规则或不规则地图。把走迷宫的对象设置成角色方块,使用键盘的方向键控制当前移动点进行游戏。按照遍历规则地图的起点不同,把游戏分简单,中等,高难三种难易程度。运用回溯法从入口一步步进行探索,最后找到迷宫出口,并在界面上显示出该路径。编写画布类函数Canvas()实现游戏设置。游戏的成功开发表明,算法研究至关重要,应用这些算法开发游戏是有效的。The paper designed and developed a Maze game under the Eclipse platform by using Java development tool. The random distributed point algorithm is used to generate an irregular map, and the algorithm of depth-first traveling is used to generate a regular map. Setting different size of the map’s grid in the map on the same game window forms three kinds of degree of difficulty which are low, medium, and high. Set the game walker as a role object, use the keyboard’s arrow keys to control the current point move, and we can play the game. From different point to travel form three level games on regular map which are simple, medium, and difficulty. Take backtracking method to search the path from entrance to the exit step by step, find it at last, and show the path on the interface. Program the function Canvas() to set the game configurations. The result of successful development of the Maze game shows that algorithms are important and using them to develop the game is effective.
分 类 号:TP311.52[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.238