久久久久久精品无码人妻_青春草无码精品视频在线观_无码精品国产VA在线观看_国产色无码专区在线观看

CSC 256代寫、C++設(shè)計(jì)編程代做

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



CSC 256-04 Final Project Part 2 (50 Points)
An ancient robot game
For this project, you are given a program that implements a game where a human user
tries to escape from four robots. The user and four robots are on an x-y grid. On every
step, you enter a move for the human. The robots will attempt to get closer to the human.
When a robot has the same x-y coordinates as the human, the game is over. You will
translate this program faithfully, following all function call guidelines and MIPS register
use conventions.
Two arrays x[4] and y[4] keep track of the x- and y-coordinates of four robots. The
positions of the human and the four robots are initialized in the program. On each step,
the user enters a move; the positions of the human and the robots are updated. This
continues until the human dies. This figure gives an idea of the game; we’ll work with a
text-only version, sorry.
In the main loop, the user is prompted to enter a move. The position of the user is
updated. Then the program calls a function moveRobots() to update the position of
the robots as they try to catch the human. The new positions of the human and the robots
are then displayed.
The function moveRobots() has prototype
int moveRobots(int *arg0, int *arg1, int arg2, int arg3)
arg0 is the base address of array that contains the x-coordinates of the four robots, arg1 is
the base address of array that contains the y-coordinates of the four robots, arg2 is the
x-coordinate of the human, arg3 is the y-coordinate of the human.
moveRobots()updates the positions of the four robots, and returns a 1 if the human is
alive, and a 0 if the human is dead (i.e., the human has the same coordinates as a robot).
Each coordinate of a robot is updated by calling the function getNew(), which returns
the new coordinate based on the current coordinate of the robot and the current
coordinate of the human.
When you translate moveRobots() to MIPS assembly language, arg0 through arg3
are in $a0 through $a3; the return value is in $v0.
The function getNew() uses simple rules to move a robot closer to the human. If the
difference in the coordinates is >=10, the robot's coordinate will move 10 units closer to
the human. If the difference in the coordinates is < 10, the robot's coordinate will
move one unit closer to the human. (See program listings.) getNew() has prototype
int getNew(int arg0, int arg1)
arg0 is the coordinate (x or y) of a robot, arg1 is the coordinate (x or y) of the human.
getNew() returns the new coordinate of the robot, based on the position of the human.
The function getNew() is already translated to MIPS assembly language, arg0 and arg1
are in $a0 and $a1 respectively, and the return value is in $v0.
A copy of the C++ program robots.cpp can be found here. The file assembly file contains
the main program and getnew(), already translated into MIPS assembly language. Your
functions will follow the main program in the same file. The template assembly file can
be found on Canvas.
Write the functions exactly as described in this handout. Do not implement the
program using other algorithms or tricks. Do not even switch the order of the arguments
in function calls; you must follow the order specified in the C++ code. The purpose of
this program is to test whether you understand nested functions. If you wish to make
changes to the algorithm, you must first check with the instructor.
Your functions should be properly commented. Each function must have its own header
block, including the prototype of the function, the locations of all arguments and return
values, descriptions of the arguments and how they are passed, and a description of what
the function does. Paste in the C++ code as inline comments for your MIPS assembly
code.
Submission: submit your code via Canvas. All your code should be in a single plain text
file(PDF only).
80% of your grade is for correctness. 20% is for clarity/documentation.
Output%
Your coordinates: 25 25
Enter move (1 for +x, -1 for -x, 2 for + y, -2 for -y):2
Your coordinates: 25 26
Robot at 10 10
Robot at 10 40
Robot at 40 10
Robot at 40 40
Enter move (1 for +x, -1 for -x, 2 for + y, -2 for -y):1
Your coordinates: 26 26
Robot at 20 20
Robot at 20 30
Robot at 30 20
Robot at 30 30
Enter move (1 for +x, -1 for -x, 2 for + y, -2 for -y):2
Your coordinates: 26 27
Robot at 21 21
Robot at 21 29
Robot at 29 21
Robot at 29 29
Enter move (1 for +x, -1 for -x, 2 for + y, -2 for -y):1
Your coordinates: 27 27
Robot at 22 22
Robot at 22 28
Robot at 28 22
Robot at 28 28
Enter move (1 for +x, -1 for -x, 2 for + y, -2 for -y):2
Your coordinates: 27 28
Robot at 23 23
Robot at 23 28
Robot at 27 23
Robot at 27 28
AAAARRRRGHHHHH... Game over
libra%

請(qǐng)加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp


















 

標(biāo)簽:

掃一掃在手機(jī)打開當(dāng)前頁(yè)
  • 上一篇:代做FINM7008、代寫FINM7008 Applied Investments
  • 下一篇:COMP30024代做、代寫 Game of Tetress
  • 無(wú)相關(guān)信息
    昆明生活資訊

    昆明圖文信息
    蝴蝶泉(4A)-大理旅游
    蝴蝶泉(4A)-大理旅游
    油炸竹蟲
    油炸竹蟲
    酸筍煮魚(雞)
    酸筍煮魚(雞)
    竹筒飯
    竹筒飯
    香茅草烤魚
    香茅草烤魚
    檸檬烤魚
    檸檬烤魚
    昆明西山國(guó)家級(jí)風(fēng)景名勝區(qū)
    昆明西山國(guó)家級(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

    久久久久久精品无码人妻_青春草无码精品视频在线观_无码精品国产VA在线观看_国产色无码专区在线观看

    久久国产乱子伦免费精品| 午夜一级免费视频| 波多结衣在线观看| r级无码视频在线观看| www.污网站| 香蕉视频xxxx| 国产日韩一区二区在线观看| 性一交一乱一伧国产女士spa| 懂色av一区二区三区四区五区| 色综合天天色综合| 日本成人黄色网| 国产特级黄色大片| 欧美午夜性视频| 国产精品国三级国产av| 浴室偷拍美女洗澡456在线| 激情图片中文字幕| 日本中文字幕观看| 国内国产精品天干天干| 国产小视频精品| 美女黄色片视频| 日韩有码免费视频| 免费黄色特级片| 精品999在线| 一区二区三区入口| 狠狠热免费视频| 亚州精品一二三区| 艹b视频在线观看| 2025韩国理伦片在线观看| 青青青在线视频免费观看| 国产精品igao| 亚洲一区二区三区四区五区| 黄色手机在线视频| 一起操在线视频| 欧美国产在线一区| 国产又粗又爽又黄的视频| 国产欧美自拍视频| www.欧美黄色| 国产91美女视频| 黑鬼大战白妞高潮喷白浆| 国产精品免费成人| 五月天激情播播| 中文字幕第50页| 欧洲精品在线播放| 激情综合在线观看| 日本www.色| 午夜激情视频网| 男女啪啪免费观看| 18禁网站免费无遮挡无码中文| 日本欧美黄色片| 国产精品人人妻人人爽人人牛| 网站一区二区三区| 伊人精品视频在线观看| 黄色特一级视频| 内射国产内射夫妻免费频道| 毛片av免费在线观看| 999在线观看| 国产 欧美 日本| 久草青青在线观看| 亚洲xxx在线观看| 91九色国产ts另类人妖| 免费无码毛片一区二三区| 一区二区三区韩国| 99re8这里只有精品| 日本一本二本在线观看| 波多野结衣国产精品| 999一区二区三区| 少妇人妻互换不带套| 亚洲欧美日韩不卡| 男人插女人视频在线观看| 亚洲激情在线观看视频| 欧美大黑帍在线播放| 成年人在线观看视频免费| 9999在线观看| jizzjizzxxxx| 不卡中文字幕在线| 成人观看免费完整观看| 波多野结衣网页| 欧美日韩亚洲第一| 手机看片日韩国产| 国产精品97在线| 国产欧美综合一区| 熟妇人妻无乱码中文字幕真矢织江| 日本三级福利片| 午夜dv内射一区二区| 国产毛片久久久久久国产毛片| 少妇网站在线观看| 亚洲精品无码国产| 亚洲综合伊人久久| 国产精品免费成人| 福利视频一区二区三区四区| 四虎成人在线播放| 国产精品天天av精麻传媒| 无码av天堂一区二区三区| 一级黄色录像在线观看| 久久久久久久午夜| 8x8x华人在线| 999在线精品视频| 日本熟妇人妻中出| 欧美日韩黄色一级片| 国产奶头好大揉着好爽视频| 一道本视频在线观看| 黄色动漫网站入口| 无码粉嫩虎白一线天在线观看| 两性午夜免费视频| 三上悠亚在线一区二区| 免费黄色福利视频| 久久国产午夜精品理论片最新版本| 亚洲第一精品区| 91高清国产视频| 久久婷婷国产91天堂综合精品| 日日橹狠狠爱欧美超碰| 国产激情片在线观看| 超碰在线免费av| 亚洲美女性囗交| 另类小说第一页| 天天爽天天爽夜夜爽| 日韩在线第三页| 爱福利视频一区二区| 国产素人在线观看| 美女扒开大腿让男人桶 | www.51色.com| 香蕉视频999| 国产精品嫩草影院8vv8| 99热这里只有精品在线播放| 看欧美ab黄色大片视频免费 | www.桃色.com| 国产乱码一区二区三区四区| 99热一区二区| 91网址在线观看精品| 国产农村妇女精品久久| 99九九99九九九99九他书对| 亚洲另类第一页| 日本一二三区在线| 香蕉视频在线网址| 99热都是精品| 久久人人爽人人爽人人av| 久无码久无码av无码| 成年人网站国产| 日韩少妇内射免费播放18禁裸乳| 韩国日本在线视频| 黄色一级免费大片| 潘金莲激情呻吟欲求不满视频| 91aaa精品| 免费在线黄网站| 欧美日韩亚洲一| 91福利国产成人精品播放| 三区视频在线观看| 特级西西444| 国产原创中文在线观看 | 性chinese极品按摩| 激情五月婷婷基地| 国产欧美自拍视频| 青青青青草视频| 日日摸天天爽天天爽视频| 中文字幕成人免费视频| 麻豆一区二区三区在线观看| 亚洲 自拍 另类小说综合图区| 日韩手机在线观看视频| 色天使在线观看| 青春草在线视频免费观看| 国产精品国产对白熟妇| 国产精品第12页| 爽爽爽在线观看| 日韩精品视频在线观看视频 | 日韩av.com| 国产精品igao激情视频| 久久国产亚洲精品无码| 亚洲综合欧美激情| 国产免费内射又粗又爽密桃视频| 国产女大学生av| 一本之道在线视频| 欧美在线观看成人| 一级日本黄色片| 日本在线视频www| 中文字幕第一页亚洲| 青青青在线播放| 日本天堂免费a| 国产精品一区二区小说| 国产高清不卡无码视频| 成人性视频欧美一区二区三区| 欧美日韩在线免费观看视频| 国产美女无遮挡网站| 黄色a级在线观看| 自拍偷拍 国产| 肉大捧一出免费观看网站在线播放| 国产精品视频一区二区三区四区五区| 三级黄色片免费看| 久久久久久久久久久福利| 老司机午夜网站| 亚洲综合日韩欧美| 亚洲人成无码网站久久99热国产| 中文字幕在线综合| 国产黄视频在线| 久久久久久久久久久久久国产| 男女污污的视频| 欧美网站免费观看| 国产乱人伦精品一区二区三区| 蜜臀一区二区三区精品免费视频| 免费毛片小视频| 99热久久这里只有精品|