文件名称:adventure
介绍说明--下载内容来自于网络,使用问题请自行百度
初学C++时的一个小程,古堡救美游戏,输入命令指引hero探险,遇到princess胜利,遇到monster结束,主要为了熟悉c++,熟悉oop思想
The program is debugged on the plat of VC 6.0
其主体结构为:
int main()
{
Welcome()
while(1)
{
Adventure() //游戏主体
cout<<endl<<\"Do you wanna to try it again (Yes / No) :\"
cin>>Choice
if(choice is not yes) //判断用户是否要继续游戏
break
}
return 0
int adventure()
{
While (1){
Command() //分析输入命令,进入下一个房间
If(meet monster)
Break //gameover
If (meet princess)
Cout<<”you have meet the princess ,take her to a safe place”<<endl
If (meetprincess && currentinlobby)
Win() //win the game
}
}
The program is debugged on the plat of VC 6.0
其主体结构为:
int main()
{
Welcome()
while(1)
{
Adventure() //游戏主体
cout<<endl<<\"Do you wanna to try it again (Yes / No) :\"
cin>>Choice
if(choice is not yes) //判断用户是否要继续游戏
break
}
return 0
int adventure()
{
While (1){
Command() //分析输入命令,进入下一个房间
If(meet monster)
Break //gameover
If (meet princess)
Cout<<”you have meet the princess ,take her to a safe place”<<endl
If (meetprincess && currentinlobby)
Win() //win the game
}
}
(系统自动生成,下载前可以参看下载内容)
下载文件列表
adventure/
adventure/Beauty.cpp
adventure/header.h
readme.txt
adventure/Beauty.cpp
adventure/header.h
readme.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.