assignment 3作业:让我欢喜让我忧
先贴老师给的要求(粗体和中文注释是我自己加的,还是不得不用到金山词霸啊):
It is a command line game. The game player (the hero) will conduct an adventure in a dangerous castle with multiple floors and many rooms. His mission is to find the princess who was kidnapped by monsters and save her away from the scary castle. The rooms are in different types with different exits. Some of the rooms are occupied by monsters. If the hero encounters a monster, he will lose his life. (You can be nicer to give him more lives. Assuming you will give him 3 lives to live in total, he will be dead after fighting against 3 monsters.)
When the game starts, the player’s position is initialized in the lobby(前厅、大厅) of the 1st floor. The program shows the information about the lobby: such as room’s name, how many exits and the names of each exit (like “east”, “south”, “up”). The information can be: Welcome to the lobby. There are 3 exits as: east, west and up. Enter your direction to go:
Then the player can input the name of exits to enter another room connected to that exit. Eg. East, then the player’s position is changed to that room, the program displays the information of that room just as it does with Lobby’s. The player can continue to input where he wants to go. Once he enters a room with a monster, the program will display the monster’s info and end the game. (If you decide to give the player multiple lives, this part will be slightly different.) Once he enters a room with the princess, the program displays the info of the princess. Then the player still needs to find a way from that room to the lobby and pick the right exit to leave the castle.
Requirements:
1. At least there should be 3 different types of rooms;
a. Room has two different properties(特性、属性):
i. Occupants(占用者): Monster, Princess, Empty
ii. Exits numbers: 1, 2, 3, 4, 5, 6 with different directions of East, West, South, North, Up and Down
2. At least there should be 5 rooms;
3. The positions of the monsters and the princess should be random.
大致意思就是,写个王子救公主的游戏,场景是一个城堡,里面有很多房间。起点是lobby。房间的 occupants有三种:Monster, Princess, Empty。进入有Monster的屋子你就死了(或者少一条命)、进入有Princess的屋子的话就把她带上再顺利回到lobby才算赢。
而且这个城堡还是多层的0 0你要有East, West, South, North, Up and Down六个方向可以走然后到达其他的房间。房间的type要有至少三种(比如一楼的必然不能Down吧,我怎么想着都觉得至少得有6种啊
)。
看完之后觉着挺好玩也挺有爱。。。然而如果这么个东西是得让你写出来呢。。。这assignment让人情何以堪啊。。。上其他老师的OOP的人你们有没有这么飘逸的作业啊!想着两周之后我能写出这么个东西来顿时觉得人生如此神奇- -#
然而C++的图形界面不会用啊
难道要自学么。。。可是如果自学到这地步那不是相当于一个人写完一个大程么- -!大程还是人家代码我画图的啊
可是如果没有图形界面我暂时还是无法想象该怎么写啊。。。
这作业怎么能这样啊怎么能这样啊。。。到现在为止除了新建了一个叫做assignment 3的eclipse Project之外啥都没做过。。。怎么办啊怎么办啊。。。
本文来源 我爱IT技术网 http://www.52ij.com/jishu/5307.html 转载请保留链接。
- 评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)
-
