精品深夜AV无码一区二区_伊人久久无码中文字幕_午夜无码伦费影视在线观看_伊人久久无码精品中文字幕

COMP282代做、C++設(shè)計(jì)程序代寫

時(shí)間:2024-04-23  來源:  作者: 我要糾錯(cuò)



COMP282 – The C++ Programming Language
University of Liverpool
Department of Computer Science
Assignment CA1 : C++ Console Application
1 Deadline
Monday 29th of April at 17:00
Feedback will be released on Monday the 20th of May (3 wks later).
2 Weighting
50%
3 Overview
You will create a small interactive console-based (i.e. text based) adventure game. The
project consists of 9 tasks. You are expected to use Visual Studio 2022 Community
Edition to build your game. You should complete the tasks in order, as some tasks
assume that previous tasks have been done. Each task builds upon the previous one.
Do as much as you can and then package your project for submission. Your solution
should demonstrate your knowledge of C++. Work alone: You must work alone on the
assignment. Plagiarism checks will be run. If you notice any typos or mistakes in the
assignment that I may have missed, or if you feel something is unclear, please contact me
(andyrox@liverpool.ac.uk) or post a question in the Canvas COMP282 Discussion page
(there is a specific discussion relating to clarification of the assignments).
4 Submission Requirements
I will upload a separate document to Canvas describing submission requirements but it is
likely that you will upload your cpp and h files to Codegrade. I will also upload a rubric
describing the mark scheme. Marking will be a combination of running automatic tests
and manually reviewing the code.
4.1 Overview: Fantasy Quest Adventure Game
The assignment is to create a basic command-line game using C++ and organise game
structure using OOP methods.
The game has a fantasy theme, in a style similar to Dungeons and Dragons, consisting
1
of a player that can navigate a series of connected locations (using commands North,
South, East, West or N,S,E,W). The player can collect items and engage in combat with
monsters. The player’s score in the game increases when they defeat a monster. The
objective of the game is to achieve a high score (by defeating monsters) and to defeat
the ’end of level boss’. There should be some introductory text at the start of the game
to set the scene, and the player can leave the game at any point by typing quit. The
player can type inventory or inv to see a list of all the items they hold. The player can
type fight to engage in combat with a monster, or type collect to collect all items in
the current room.
You must use the specified class, method and variable names to ensure your code can
be tested. You will get marks for using STL containers and iterators to store and manipulate the various objects in the game. You are free to add further methods/ variables/
functions as you wish. Be sure to add comments your code, briefly explaining the purpose
and functionality of classes, methods, and significant blocks of code. Also remember to
implement error handling. In the descriptions of programming elements below, I have
deliberately not specified function parameters and return types - this is for you to specify.
Similarly I have not specified where pointer use would be appropriate.
I have specified most of the monsters/locations/objects - this is so that the gameplay can
be tested.
The assignment is organised into tasks.
4.2 Task 1 - create game classes
The following classes should be written:
• Character The Character class defines characters in the game. It should have the
following methods: setName, getName which will get or set the name of the
character, and getHitPoints and setHitPoints, which get or set the hitpoints, or
‘health rating’ of the character.
• Monster Monster should be derived from Character.
• Player Player should be derived from Character. It should have a member variable
score (an integer that keeps track of the player’s score in the game), which is set and
read using setScore and getScore, and three containers weapons, potions and
treasures which hold the player’s items. It should also have the private member
variable currentLocation which represents the player’s current location. This can
be set using setCurrentLocation and read using getCurrentLocation.
• Item Item should have the following methods: getName, setName, which will
set or get the name of the item.
• Potion Potion should be derived from Item. It should have a member variable
strength (integer), which should be accessible via getStrength and setStrength.
• Weapon Weapon should be derived from Item. It should have a member variable
power (integer), which should be accessible via getPower and setPower.
2
• Treasure Treasure should be derived from Item. It should have a member variable
value (integer), which should be accessible via getValue and setValue.
• Location A Location object represents a place within the game. It should hold
data including name and description (accessible via member functions setName,
getName, setDescription, getDescription). It should be possible for the programmer to populate a location object with other game entities, using the following
member functions: addExit (creates an exit, either N, S, E or W, leading to another location object), addMonster (puts a specific monster at this location),
delMonster (deletes monster), getExits (displays a list of exits to the player),
addItem (places a specific item at this location). Function overloading should
be used on the addItem method so that addItem handles adding potions, treasures or weapons to the location. Member variables should include the containers
weapons, potions and treasures which hold the player’s items. And exits, which
holds the exits leading to other location objects.
4.2.1 File Structure
The File Structure should be according to good C++ practice, with declarations in the .h
files and implementations in the .cpp files. However for simple one or two line functions,
those implementations can be kept in the .h file, allowing the compiler to inline them and
reduce function call overhead. For this assignment we will also keep derived classes in the
same files as their parent classes. AdventureGame.cpp should have the main() function.
Files are:
• Character.cpp
• Character.h
• Item.cpp
• Item.h
• Location.cpp
• Location.h
• AdventureGame.cpp
4.3 Task 2 - Build the game world
Build the game by creating location objects and linking them together using the objects’
exits member variable. Create 12 location objects that are linked to each other according
to the map shown.
Here are the location names:
cave, temple, dungeon, castle, clearing, hall, garden, library, forest, house, ruins, field.
3
Set each location object’s description (you can put whatever you want here) and a name
to be displayed after “you are” - e.g. ‘ruins’ might be given the name ‘in some ruins’.
After building the game, set the player’s current location to the clearing - that will be
the start location of the game.
Create a game loop in the main() function. At this stage the game loop should simply
get a command from the player, and then describe the location again. If the user types
quit, the game should display the user’s score (which at this stage will be 0), and end.
4.4 Task 3 - Room Navigation
Modify the game loop so that it now tells the user where they are, and what exits are
available (N, S, E or W).
If the user types a direction (N, S, E or W, or North, South, East or West, or n,s,e
or w), the game should work out if an exit exists in that direction, and if it does, the
current location should change to that location.
If an exit does not exist, the game should tell the user this, and remain at the current
location.
By the end of this task the user should be able to navigate around the game, and quit
the game if necessary.
4.5 Task 4 - Adding Items
Create some items (see below).
Treasures: bag of coins, treasure chest, emerald, ruby, sapphire, diamond, gold ring.
Potions: Blue Healing Potion, Purple Healing Potion, Red Healing Potion.
Weapons: dagger, sword, crossbow, club, stick.
Use addItem to add these items (weapons, potions, treasures) to the locations in the
game as follows:
4
Change the game loop so that it announces what items are in the location, if any.
This information should be obtainable from the player’s current location.
If the user types collect, all of the items in the location should be collected by the
user. If the user types inv or inventory they should see a list of all their items, in the
three groups (Potions, Treasures, Weapons). Sort the lists alphabetically. If the user
types drink, all the healing potions in the user’s inventory should be deleted, and their
‘strength’ points should be added to the player’s HitPoints.
By the end of this task the user should be able to collect all items from rooms, drink the
healing potions, and list the items in the inventory.
4.6 Task 5 - Adding Monsters
Use addMonster to add monsters to the rooms.
Here are the monster names:
vampire, zombie, dragon, goblin, spectre, banshee, ghoul, orc.
Arrange the monsters in the game as follows, with the following hitpoint values:
Change the game loop so that it announces the presence of a monster in a room.
Note that the house has two monsters.
By the end of this task there should be monsters in locations.
5
4.7 Task 6 - Combat
By the end of this task it should be possible to engage in combat with the monsters/enemies
according to the rules of combat, by typing fight.
Create a function called rollDice which will return a random integer from 1-6.
Create a member function of the Player class, called combat, that will conduct combat
with between the player and any enemies in the current location. The rules of combat
are as follows:
1. Both Monster and Player have a hitpoint value. Once a character’s hitpoint value
reaches 0, that character is defeated.
2. The Monster strikes first.
3. Their damage to the player is determined by calling rollDice and multiplying the
result by 2. (So result can be 0-12).
4. The player’s hitpoint total is reduced by the damage inflicted by the Monster.
5. The player then strikes back - rollDice is called, and this is modified by the weapon
with the highest power rating. So if the player has a sword with a power of 10, 10
is added to the dice roll to determine damage done to the monster.
6. This cycle continues until either the player or the enemy reaches 0 hitpoints.
7. After each round, the hitpoints of each combatant are displayed to the user.
8. If there is more than one monster in the room, only one monster is engaged in
battle when the user types fight - the user needs to type it again to fight the
other monster. The monster order should be strongest first - so the player fights
the monster with the higher hitpoints first.
9. The Character class should have the member function takeHit added to it, which
will decrease the character’s hitpoints by the given amount.
10. If the player is defeated, the player’s score is shown and the game ends.
4.8 Task 7 - The Boss
Create a new Player character called ‘boss’, give it a name and description, and add the
boss to the game. Put the boss in the cave. Modify the game loop so that when the
boss is defeated, the game ends.
4.9 Task 8 - Game Enhancements
Add further items to the game:
Treasures: Cup, Pearl, Key, Book
Potions: Green Healing Potion
You can decide their value, and strength in the case of the healing potion.
Put these items into the possession of some of the monsters. Make sure that the ghoul
6
has the key.
Modify the game so that when a monster is defeated, their items become available in the
room for the player to collect.
4.10 Task 9 - Implementing Armour
Create a new child class of Item called Armour.
Add at least 5 examples of armour into the game. Some examples:
ringmail, chainmail, shield, breastplate, helmet, gauntlet.
As well as name and description, the Armour class should have a member variable called
protection. You can decide values for this. But make sure that you put the gauntlet, with a protection of 2, in the library. Armour reduces the effect of damage
inflicted on the character. All Character objects should have the ability to use armour, so
it should be implemented at the Character (parent class) level. All armour items should
be listed to the user when they type inv or inventory. Modify the combat rules so
that during combat, damage inflicted on the player by an enemy is reduced by a random
amount between 0 and the total value of protection of all the armour in the player’s

請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp

標(biāo)簽:

掃一掃在手機(jī)打開當(dāng)前頁
  • 上一篇:FIT5225 代做、代寫 java,c++語言程序
  • 下一篇:代寫DTS101TC、代做Python設(shè)計(jì)編程
  • 無相關(guān)信息
    昆明生活資訊

    昆明圖文信息
    蝴蝶泉(4A)-大理旅游
    蝴蝶泉(4A)-大理旅游
    油炸竹蟲
    油炸竹蟲
    酸筍煮魚(雞)
    酸筍煮魚(雞)
    竹筒飯
    竹筒飯
    香茅草烤魚
    香茅草烤魚
    檸檬烤魚
    檸檬烤魚
    昆明西山國家級(jí)風(fēng)景名勝區(qū)
    昆明西山國家級(jí)風(fēng)景名勝區(qū)
    昆明旅游索道攻略
    昆明旅游索道攻略
  • 短信驗(yàn)證碼平臺(tái) 理財(cái) WPS下載

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 kmw.cc Inc. All Rights Reserved. 昆明網(wǎng) 版權(quán)所有
    ICP備06013414號(hào)-3 公安備 42010502001045

    精品深夜AV无码一区二区_伊人久久无码中文字幕_午夜无码伦费影视在线观看_伊人久久无码精品中文字幕
    <samp id="e4iaa"><tbody id="e4iaa"></tbody></samp>
    <ul id="e4iaa"></ul>
    <blockquote id="e4iaa"><tfoot id="e4iaa"></tfoot></blockquote>
    • <samp id="e4iaa"><tbody id="e4iaa"></tbody></samp>
      <ul id="e4iaa"></ul>
      <samp id="e4iaa"><tbody id="e4iaa"></tbody></samp><ul id="e4iaa"></ul>
      <ul id="e4iaa"></ul>
      <th id="e4iaa"><menu id="e4iaa"></menu></th>
      在线播放中文字幕一区| 国产一区在线不卡| 国产精品久久久一本精品 | 国产在线精品一区二区夜色| 亚洲精品一区二区三区蜜桃下载 | 一区二区理论电影在线观看| 欧美经典一区二区| 久久综合久久综合亚洲| 欧美不卡123| 精品国产一二三区| 久久人人97超碰com| 精品国产人成亚洲区| 日韩精品中文字幕一区 | 亚洲欧美日韩国产中文在线| 国产精品视频第一区| 欧美韩国日本不卡| 国产精品视频免费看| 国产精品久久久一区麻豆最新章节| 久久综合色8888| 精品国产一区二区三区四区四| 91精品久久久久久久99蜜桃| 欧美一级理论片| 久久婷婷色综合| 久久综合九色综合欧美就去吻| 日韩欧美中文字幕精品| 精品日韩一区二区三区免费视频| 日韩一级二级三级精品视频| 欧美一区二区精美| 精品国产91亚洲一区二区三区婷婷 | 6080午夜不卡| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 国产精品久久久久久妇女6080 | 麻豆国产精品一区二区三区| 韩国女主播成人在线| 国产成人精品免费在线| 成人福利电影精品一区二区在线观看| 国产精品一区二区黑丝| 99视频热这里只有精品免费| 色呦呦日韩精品| 欧美一区二区啪啪| 国产亚洲成aⅴ人片在线观看| 国产精品天美传媒| 日韩理论在线观看| 日韩高清一级片| 国产91精品免费| 99久精品国产| 日韩一区和二区| 中文字幕av不卡| 日韩专区一卡二卡| 国产经典欧美精品| 欧美视频在线一区| 国产三区在线成人av| 亚洲高清免费视频| 成人少妇影院yyyy| 91精品国产色综合久久不卡电影| 欧美—级在线免费片| 日韩高清一区在线| 91麻豆产精品久久久久久| 精品精品欲导航| 一区二区在线免费观看| 国产剧情一区二区三区| 欧美日韩日日骚| 中文字幕第一区综合| 日韩国产精品91| 91视频免费播放| 国产人妖乱国产精品人妖| 亚洲1区2区3区视频| 91在线观看美女| 国产视频一区二区在线观看| 奇米色777欧美一区二区| 91免费国产在线观看| 国产色婷婷亚洲99精品小说| 蜜臀va亚洲va欧美va天堂| 在线视频你懂得一区二区三区| 国产婷婷一区二区| 九九视频精品免费| 日韩午夜激情av| 日韩va亚洲va欧美va久久| 在线影视一区二区三区| 中文一区一区三区高中清不卡| 狠狠色丁香婷综合久久| 91精品视频网| 日韩综合在线视频| 欧美老肥妇做.爰bbww| 亚洲第一电影网| 欧美性videosxxxxx| 一区二区三区在线观看国产| av网站一区二区三区| 国产精品久久久久久久久久久免费看 | 国产精品拍天天在线| 国产精品99久久久久久久女警| 精品欧美一区二区三区精品久久| 日韩国产欧美视频| 欧美一级视频精品观看| 蜜臀av性久久久久蜜臀av麻豆| 欧美一区二区三区小说| 蜜臀91精品一区二区三区| 日韩精品影音先锋| 韩国精品免费视频| 国产欧美一区二区精品久导航| 国内精品嫩模私拍在线| 欧美国产一区视频在线观看| 不卡视频免费播放| 亚洲国产乱码最新视频 | 久久久精品黄色| 国产伦精一区二区三区| 国产精品久久一卡二卡| 波多野结衣欧美| 亚洲va韩国va欧美va精品| 日韩欧美123| 国产精品1区2区3区在线观看| 国产精品高清亚洲| 欧美巨大另类极品videosbest | 亚洲欧美激情视频在线观看一区二区三区 | 狠狠色丁香婷综合久久| 国产精品久久免费看| 欧美丝袜自拍制服另类| 麻豆成人91精品二区三区| 亚洲国产高清aⅴ视频| 欧美日韩亚州综合| 激情综合网天天干| 亚洲免费在线视频| 精品成人一区二区三区四区| av中文一区二区三区| 亚洲午夜激情网页| 欧美激情一区二区三区在线| 欧美视频精品在线观看| 国产成人鲁色资源国产91色综 | 欧美一级免费观看| jiyouzz国产精品久久| 青青草伊人久久| 国产精品成人一区二区艾草| 欧美男男青年gay1069videost| 国产精品影视天天线| 天堂久久一区二区三区| 日韩毛片在线免费观看| 久久青草国产手机看片福利盒子| 91传媒视频在线播放| 成人一区二区视频| 蜜臀精品一区二区三区在线观看 | 亚洲大片精品永久免费| 中文字幕精品一区二区三区精品 | 亚洲成人av在线电影| 国产精品视频一二三| 精品国产99国产精品| 5月丁香婷婷综合| 欧美综合一区二区| 久久成人免费网| 一区二区三区国产豹纹内裤在线| 久久久久久久久99精品| 欧美成人一级视频| 欧美日本一区二区三区四区| 色噜噜夜夜夜综合网| 99久久综合99久久综合网站| 国产一区在线观看麻豆| 免费高清成人在线| 青青青爽久久午夜综合久久午夜 | 欧美老女人在线| 欧美视频完全免费看| 在线视频综合导航| 91免费看视频| 色综合久久六月婷婷中文字幕| 国内精品久久久久影院薰衣草| 日韩高清国产一区在线| 亚洲午夜电影在线观看| 综合av第一页| 国产精品不卡视频| 国产欧美日韩另类一区| 国产欧美日韩另类视频免费观看| 久久综合999| 日本一二三不卡| 国产精品美女一区二区在线观看| 亚洲国产精品二十页| 欧美国产禁国产网站cc| 亚洲国产精品精华液2区45| 国产精品蜜臀在线观看| 国产精品高清亚洲| 有坂深雪av一区二区精品| 亚洲v日本v欧美v久久精品| 午夜国产精品影院在线观看| 日韩av二区在线播放| 激情综合色综合久久综合| 国产成人激情av| 色综合久久中文综合久久97| 在线影院国内精品| 日韩欧美一卡二卡| 国产精品久久久久久久蜜臀| 一区二区三区蜜桃网| 免费成人在线视频观看| 国产一区二区三区综合| 91麻豆自制传媒国产之光| 欧美片在线播放| 亚洲欧美怡红院| 久久99这里只有精品| 在线影院国内精品| 国产三级精品三级在线专区| 日韩av成人高清| 欧美亚洲国产一区在线观看网站 | 视频精品一区二区| 91视频国产观看|