99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

代寫COMP 3023、C++程序設計代做

時間:2024-06-02  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



COMP 3023 Design Patterns with C++ 
Assignment 1 COMP 3023 
Introduction 
In this individual assignment, you have been tasked by your client to create a command-line based 
simulation game in C++. In the game the player controls a team of devoted robots working for the 
company. Following the orders of the player, the robots have to perform dangerous exploration 
missions in hazardous locations in order to collect scrap. The scrap can then be sold to reach quota 
and unlock items that will increase the robot’s ability to work. Should the robots fail to meet the 
quota in time, they will be shut down. The goal of the player is to manage assets (money, items, 
robots and scrap) to keep the robots running for as long as possible. 
Assignment and submission requirements 
The assignment has the following requirements. Failing to address any of these requirements will 
result in deducted marks. 
1. The assignment must be submitted via CloudCampus. 
2. You must the full source code and be written in C++. 
3. It must build and run from Visual Studio 2022 on Windows. 
4. The code must be compressed using the common ZIP compression. 
5. The functioning executable must run from command line under Windows 10 or higher. 
6. The output needs to be in English 
Game overview 
The game is a single-player asset management game, where the player tries to stay alive for as long 
as possible. To do so, the player must meet a certain quota every 4 game days (also called a cycle). 
Money is made by sending robots to locations where scrap can be collected, and then selling this 
scrap later on. 
Every day, the player chooses a location and orders robots to go on expeditions in an attempt to 
collect scrap. Once the player chooses to leave the location, a new day begins. The player can also 
choose to travel home where the collected scrap can be sold for cash. 
The player does not control robots. Instead, they choose the number of robots they wish to send on 
exploration missions, and a chanced-based simulation determines how much scrap is collected and 
how many robots make it back. 
At the beginning of each day, 4 robots are available. When landed on the location, robots may die 
during expeditions. If all 4 robots are broken, the player is forced to leave the location and a new day 
begins. Robots that broke during the day are repaired at the beginning of the next day so that all 4 
robots are available again. 
The player should also pay attention to the weather of the location they land on. At the beginning of 
each day, the weather of each location is randomized. The weather will directly affect expedition 
simulation parameters such as the amount of scrap that can be collected by robots, and/or the 
survival chance of robots. To achieve all of these actions, the player uses a simple command system. All commands start with a 
word (e.g. “land”, “leave”, etc.) and may be followed by any number of arguments. 
Example session 
1. A typical session would proceed as follows: 
2. The player starts the game. They begin with a cargo value of $0 (no scrap), an initial balance 
of $50, a first quota of $150, and no items. Day 1 starts, and the player at home. 
3. The player uses the “locations” command to see what locations are available and what is 
their current weather conditions. 
4. The player makes a choice and uses the “route” command followed by the name of the 
location they wish to route to select a location. They may use this command as many times 
as they wish. 
5. Once they made up their mind, the player uses the “start” command, which marks the 
beginning of the landed phase. 
6. The player begins the landed phase with 4 robots alive. They use the “send” command, 
followed by the number of robots they wish to send to start an expedition. 
7. A simulation algorithm takes over and determines the number of robots that make it back 
alive as well as how much scrap they bring back based on parameters such as the chosen 
location and items bought. 
8. The player is told about the result of the expedition (e.g. “N robots made it back and brought 
$X worth of scrap”). That scrap is added to the cargo value (and not to the balance). From 
there, the player can re-use the “send” command as long as at least one robot is functioning. 
If, however, all robots breakdown as part of an expedition, all the cargo is lost, and the player 
leaves the location immediately. 
9. When the player feels like they’ve collected enough scrap, they can use the “leave” 
command to go back home. This will bring the current day to an end and start the next one, 
with all 4 robots working again. 
10. At that point, the player would typically repeat operations from step 2, 3, 4 or 5 up to 9. 
11. Alternatively, if they’d like to sell the collected scrap for cash, they can choose to navigate to 
home using the “route home” command. 
12. On the corporation location, the player would use the “sell” command, either on its own to 
sell all of their, or followed by an amount to sell only a fraction of it. This will effectively 
convert to scrap into usable money (in other words, the cargo value is transferred to their 
balance). 
13. When done, the player uses the “leave” command, which would also mark the end of that 
day. 
14. At the end of every 4 days, the player is expected to meet quota (reach the predefined cash 
threshold). Only the balance is considered, which means that the scrap must be sold before 
the end of the 4th day. If they fail to do so, the game displays the number of days they have 
survived before exiting. If they succeed, a new 4-day cycle begins with an increased quota. 
The quota amount is not deducted from the player’s balance. 
 Implementation 
Your assignment must design and implement at least the following classes: 
Game — The Game object drives the game. The Game object: 
• Is responsible for initialising a new game. 
• Is responsible for defining the locations & items available to the game. 
• Is responsible for showing the welcome screen. 
• Is responsible for running the 4-day cycle loop and the day loops. 
• Is responsible for reading, parsing and dispatching commands. 
• Is responsible for handling the following commands: 
o START 
o LEAVE 
o EXIT 
• Is responsible for keeping track of the balance. 
• Is responsible for keeping track of the location currently being orbited or landed on. 
• Is responsible for keeping track of the game phase (orbiting or landing). 
• Is responsible for keeping track of the cargo value. 
• Is responsible for keeping track of alive employees. 
• Holds the item manager, the location manager and the game’s random number generator 
instance. 
Location manager — Manages the locations and handles the related commands. The location 
manager: 
Keeps (a) data structure(s) containing all the locations defined by the Game, keeping the registration 
order (e.g. the order in which locations have been defined). 
Handles the following commands: 
LOCATIONS 
ROUTE 
When implementing the location manager, we suggest having a function that will be called by 
“Game” to register a location: 
void registerLocation(AbstractLocation* location); 
AbstractLocation — Represents the base type of a location in the game. The AbstractLocation class 
should be an abstract class so that differences between the corporation location and other locations 
can be handled properly. A location should: 
• Have a name 
• Contain an description for the weather conditions it is currently experiencing. 
• Handle the following commands: 
o SEND 
o SELL 
• Print a welcome message that will be displayed after reaching the location 
When implementing AbstractLocation, define an enum for weather conditions: (Clear, Flooded, 
Eclisped, Stormy). Add a function that returns its name: 
const std::string& name() const; 
Have a function that will be called by the game when a day begins: 
virtual void onDayBegin(Game& g); 
Have functions that handle the SELL and SEND commands: 
virtual void sellCargo(Game& g, int amount) = 0; 
virtual void sendEmployees(Game& g, int count) = 0; 
Hints and tips 
Random number generation. C++’s random number generation is relatively complex. It features 
different number generators and its syntax is a bit uncanny. To use it, make sure to create a single 
number generator instance that you will re-use everywhere in your code. For that, we will use 
mt19937 (MT19937 is one of many random number generator implementation): 
#include std::mt19937 
myGenerator(std::random_device{}()); 
You can then generate a random int between A and B (both inclusive) using the following code: 
std::uniform_int_distribution intDistribution(A, B); 
int myRandomNumber = intDistribution(myGenerator); 
Similarly, you can generate a random float between 0.0 and 1.0 (1.0 excluded) using the following 
code: 
std::uniform_real_distribution realDistribution; float 
myRandomNumber = realDistribution(myGenerator); 
 
Simulation algorithm 
The following pseudocode calculate and returns the outcome of an expedition: 
numOperators = 4 
robotSurvivalChance = robotsBaseSurvivalChance * 
survivalChanceMultiplier 
deadRobots = 0 
REPEAT numRobots TIMES: 
 revenue = randomIntBetween(minScrapValue * scrapValueMultplier, 
maxScrapValue * 
 scrapValueMultplier) 
 IF randomFloat01() < RobotsurvivalChance: 
 //This robot made it out alive 
 totalRevenue = totalRevenue + revenue 
 ELSE 
 totalRevenue = totalRevenue + revenue * lootRecoveryMultiplier  deadRobots = deadRobots + 1 
 END IF 
END REPEAT 
RETURN deadRobots, totalRevenue 

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










 

掃一掃在手機打開當前頁
  • 上一篇:代寫159.234 OBJECT-ORIENTED程序
  • 下一篇:菲律賓達沃島旅游(達沃有機場嗎)
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
    合肥機場巴士2號線
    合肥機場巴士2號線
    合肥機場巴士1號線
    合肥機場巴士1號線
  • 短信驗證碼 豆包 幣安下載 AI生圖 目錄網

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          久久国产精品毛片| 久久深夜福利免费观看| 亚洲免费视频在线观看| 亚洲欧美视频一区二区三区| 一区二区欧美日韩| 在线视频日本亚洲性| 先锋a资源在线看亚洲| 欧美一区高清| 裸体一区二区三区| 欧美啪啪成人vr| 国产免费成人av| 在线国产欧美| 亚洲深夜福利| 久久综合国产精品台湾中文娱乐网| 免费日韩成人| 国产精品久久久亚洲一区 | 亚洲午夜一区二区| 久久精品男女| 欧美日韩一区二区视频在线| 国产亚洲精品激情久久| 亚洲欧美日韩中文播放| 欧美精品一区在线发布| 亚洲性线免费观看视频成熟| 久久精品日韩欧美| 欧美日本在线播放| 韩国av一区二区三区四区| 亚洲人屁股眼子交8| 久久精品成人一区二区三区| 欧美久久久久久| 国内精品写真在线观看| 亚洲无吗在线| 欧美精品免费看| 激情亚洲网站| 午夜视频一区在线观看| 欧美日韩精品一区| 亚洲国产精品成人一区二区| 亚洲欧美日韩国产成人| 欧美日韩高清在线播放| **性色生活片久久毛片| 欧美中文字幕在线观看| 国产精品久久| 一区二区三区回区在观看免费视频| 久久三级视频| 国产真实乱偷精品视频免| 亚洲色图在线视频| 欧美人与性禽动交情品| 亚洲成人中文| 久久夜色精品| 极品尤物一区二区三区| 欧美专区亚洲专区| 国产欧美日韩在线播放| 亚洲尤物影院| 国产精品一区在线观看你懂的| 在线视频你懂得一区| 欧美精品啪啪| 日韩视频在线免费| 欧美激情免费在线| 一本色道久久综合亚洲精品小说| 欧美电影免费观看网站| 亚洲国产天堂久久国产91| 免费视频一区| 亚洲精选视频免费看| 欧美日韩成人激情| 正在播放亚洲一区| 国产精品成人久久久久| 亚洲一级二级| 国产欧美日韩精品a在线观看| 先锋影音国产一区| 国产亚洲欧美日韩一区二区| 欧美一区二区三区视频免费| 国产亚洲精品bv在线观看| 久久国产88| 在线看欧美日韩| 欧美精品一区二区久久婷婷| 日韩一级在线观看| 国产精品高潮呻吟| 久久福利一区| 亚洲国产成人在线播放| 欧美国产日韩一区| 一区二区日韩免费看| 国产伦精品一区二区| 久久超碰97人人做人人爱| 在线成人国产| 欧美三日本三级三级在线播放| 亚洲一区精品电影| 国内精品久久国产| 欧美精品在线播放| 欧美一级大片在线观看| 在线看欧美视频| 欧美极品在线播放| 欧美一区二区日韩一区二区| 精品1区2区3区4区| 欧美日韩三级| 久久久www成人免费毛片麻豆| 亚洲三级色网| 国产日韩欧美夫妻视频在线观看| 久久综合九色99| 亚洲视频网在线直播| 伊人成年综合电影网| 欧美日韩国产成人精品| 久久国产日本精品| 亚洲老司机av| 国产亚洲欧美激情| 国产精品久久毛片a| 老司机精品视频一区二区三区| 亚洲视频 欧洲视频| 黑人中文字幕一区二区三区| 欧美日韩在线影院| 免费在线一区二区| 性欧美大战久久久久久久久| 在线播放豆国产99亚洲| 国产精品私拍pans大尺度在线| 蜜桃av久久久亚洲精品| 亚洲综合视频1区| 亚洲精品综合精品自拍| 国产精品无码永久免费888| 欧美久久99| 欧美国产第二页| 久久精品国产久精国产一老狼 | 黄色成人免费观看| 欧美亚州一区二区三区| 欧美国产第一页| 久久深夜福利| 久久久久久久久综合| 亚洲在线观看| 国产精品99久久久久久久vr| 亚洲另类在线一区| 亚洲日本中文字幕| 亚洲日本成人女熟在线观看| 在线欧美电影| 在线播放豆国产99亚洲| 影院欧美亚洲| 亚洲春色另类小说| 伊人色综合久久天天五月婷| 国产一区免费视频| 国内精品免费在线观看| 国产亚洲视频在线观看| 国产精品美女主播| 国产麻豆综合| 国产亚洲精品成人av久久ww| 国产精品影音先锋| 国产伦精品一区二区三区四区免费 | 亚洲在线一区二区| 亚洲欧美日韩国产综合在线| 亚洲一区精品视频| 午夜欧美精品| 久久野战av| 欧美高清视频www夜色资源网| 欧美黑人在线播放| 欧美午夜片在线免费观看| 国产精品嫩草99a| 国产亚洲免费的视频看| 亚洲高清在线| 亚洲最新合集| 欧美一区日本一区韩国一区| 久久激情五月婷婷| 欧美激情a∨在线视频播放| 欧美日韩一区二区三区四区在线观看| 国产精品成人aaaaa网站| 国产视频一区在线观看| 一区在线观看| 日韩一级免费| 欧美亚洲免费电影| 久久中文久久字幕| 欧美三区在线观看| 国产在线不卡| 夜色激情一区二区| 久久久久久亚洲精品中文字幕| 欧美成人午夜77777| 国产精品久久久久久一区二区三区 | 在线观看国产日韩| 一本色道久久88精品综合| 午夜亚洲性色福利视频| 欧美黄色aaaa| 国产欧美在线视频| 99精品免费视频| 欧美影院视频| 国产精品vip| 亚洲国产日本| 欧美一区日本一区韩国一区| 欧美国产高潮xxxx1819| 国产午夜精品美女毛片视频| 亚洲人成在线观看网站高清| 亚洲一区在线播放| 欧美国产日韩精品| 狠狠色丁香久久综合频道| 亚洲在线观看视频| 欧美理论在线播放| 亚洲福利视频一区二区| 欧美一区二区三区免费视| 欧美激情一区二区三区| 精品电影一区| 欧美中文字幕| 国产精品素人视频| 中文av一区特黄| 欧美韩日亚洲| 91久久精品国产91久久性色tv | 一区二区av在线| 一本色道婷婷久久欧美| 欧美日韩国产一区二区三区地区|