文件名称:迷宫游戏
介绍说明--下载内容均来自于网络,请自行研究使用
设计一个迷宫游戏,给定迷宫的入口。如果存在出口,程序能够显示行走的路径,并最终到达出口,并输出“成功走出迷宫”;如果不存在出口,程序也能够显示行走的过程,并最终回退到入口,并输出“回退到入口”
1.定义二维数组 a 存储随机迷宫.
定义四个整型值用以存储用户输入的迷宫的长(m)宽(n)以及随机设定的入口(p)出口(q)。
定义一个字符ch接收回车键的输入.
定义整型值r与l表示当前在迷宫的位置。(Design a maze game, given the entrance to the labyrinth. If there is an exit, the program can show the path of walking, and finally reach the exit, and output "successfully walk out of the labyrinth". If there is no exit, the program can also show the process of walking, and finally return to the entry, and output "back to the entry".
1. define a two-dimensional array a to store a random maze.
The four integer values are defined to store the long (m) width (n) of the labyrinth of the user input and the randomly set entrance (P) exit (q).
A character ch is defined to receive the input of the return key.
Define the integer value R and l to indicate the position of the current in the maze.)
1.定义二维数组 a 存储随机迷宫.
定义四个整型值用以存储用户输入的迷宫的长(m)宽(n)以及随机设定的入口(p)出口(q)。
定义一个字符ch接收回车键的输入.
定义整型值r与l表示当前在迷宫的位置。(Design a maze game, given the entrance to the labyrinth. If there is an exit, the program can show the path of walking, and finally reach the exit, and output "successfully walk out of the labyrinth". If there is no exit, the program can also show the process of walking, and finally return to the entry, and output "back to the entry".
1. define a two-dimensional array a to store a random maze.
The four integer values are defined to store the long (m) width (n) of the labyrinth of the user input and the randomly set entrance (P) exit (q).
A character ch is defined to receive the input of the return key.
Define the integer value R and l to indicate the position of the current in the maze.)
相关搜索: 迷宫游戏
(系统自动生成,下载前可以参看下载内容)
下载文件列表
文件名 | 大小 | 更新时间 |
---|---|---|
迷宫游戏.exe | 55296 | 2016-02-29 |
Դ.cpp | 4064 | 2016-02-29 |