亚洲十八**毛片_亚洲综合影院_五月天精品一区二区三区_久久久噜噜噜久久中文字幕色伊伊 _欧美岛国在线观看_久久国产精品毛片_欧美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ī)打開(kāi)當(dāng)前頁(yè)
  • 上一篇:代做FINM7008、代寫FINM7008 Applied Investments
  • 下一篇:COMP30024代做、代寫 Game of Tetress
  • 無(wú)相關(guān)信息
    昆明生活資訊

    昆明圖文信息
    蝴蝶泉(4A)-大理旅游
    蝴蝶泉(4A)-大理旅游
    油炸竹蟲(chóng)
    油炸竹蟲(chóng)
    酸筍煮魚(yú)(雞)
    酸筍煮魚(yú)(雞)
    竹筒飯
    竹筒飯
    香茅草烤魚(yú)
    香茅草烤魚(yú)
    檸檬烤魚(yú)
    檸檬烤魚(yú)
    昆明西山國(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

    日韩中文欧美在线| 亚洲图片你懂的| 色八戒一区二区三区| 色播在线视频| 日韩av免费| 久久黄色网页| 草久在线视频| 欧美一级做一级爱a做片性| 欧美视频日韩| 亚洲日本一区二区三区| 黄页视频在线免费观看| 精品国产三级| 国产一区二区剧情av在线| 成人av在线一区二区三区| 色88888久久久久久影院按摩| 九色在线播放| 日韩久久精品网| 久久高清国产| 动漫精品一区二区| 成人影院www在线观看| 91麻豆国产自产在线观看亚洲| 国产色91在线| 五月激情在线| 91吃瓜在线观看| 国自产拍偷拍福利精品免费一 | 精品国模一区二区三区| 日韩电影在线观看网站| 在线观看视频一区二区欧美日韩| 中日韩高清电影网| 在线国产精品一区| 色域天天综合网| 色偷偷偷在线视频播放| 日本精品视频| 丁香六月综合激情| 天天色天天操天天做| 国产高清精品二区| 91农村精品一区二区在线| 中文字幕一区免费| 久久综合88| 精品久久久久国产| 国产理论在线| 国产麻豆欧美日韩一区| 国外亚洲成av人片在线观看| 四虎影院观看视频在线观看| 欧美日韩免费| 欧美日韩久久久| 欧美暴力调教| 91在线看国产| 伦理片一区二区三区| 欧美黄色aaaa| 538prom精品视频线放| 精品一区二区三区亚洲| 国产网站一区二区三区| 尤物网在线观看| 久久九九国产| 亚洲国产精品久久久久秋霞影院 | 欧美成人自拍| 欧美日韩在线第一页| 电影亚洲一区| 国产欧美久久久精品影院| 成人黄色网址| 久久国产综合精品| 欧美性极品xxxx娇小| 456亚洲精品成人影院| 午夜精品国产| 欧美精品vⅰdeose4hd| 波多野结衣在线一区二区| 国产精品二三区| 涩涩视频在线免费看| 91亚洲国产成人精品一区二三| 大胆av不用播放器在线播放| 亚洲va久久| 天天综合网天天综合色| 996久久国产精品线观看| 国产精品久久国产精麻豆99网站| av中文字幕在线观看| 国产**成人网毛片九色 | 精品日韩av| 成人午夜短视频| 大地资源网3页在线观看| 国产一区二区三区精品视频| 欧美女子与性| 麻豆一区二区三| 国产精品免费观看| 精品一区二区免费在线观看| 欧美另类久久久品| 天堂综合网久久| av在线播放一区二区三区| 5g影院5g电影天天爽快| 久久激情电影| 国产成人综合美国十次| 欧美日韩国产高清| 在线观看成人网| 亚洲一二av| 色综合久久中文字幕| 人妖一区二区三区| 555www色欧美视频| 欧美久久一区| 欧美成人影院在线播放| 天堂影院一区二区| 91精彩视频在线播放| 97久久精品人人做人人爽50路 | 国产精品欧美精品| 福利视频亚洲| 色菇凉天天综合网| 欧美gvvideo网站| 色老板在线观看| 久久99热狠狠色一区二区| 污污片在线免费视频| 中文字幕一区三区| 成人免费在线电影网| 日韩一区二区在线看| 亚洲麻豆一区| 欧美日韩在线资源| 国产精品乱码久久久久久| 深夜激情久久| 精品精品欲导航| 免费成人美女在线观看.| 女子免费在线观看视频www| 久久国产88| 日韩成人影视| 国产精品灌醉下药二区| 伊人久久大香线蕉av不卡| 99热在线免费| 国产精品主播直播| 欧美free嫩15| 欧美日韩成人在线一区| 老司机一区二区三区| 欧美色图天堂| 婷婷六月综合网| 国产精品v一区二区三区| 日本在线观看视频| 亚洲精品日韩专区silk| 欧美系列电影免费观看| 天堂a中文在线| 国产日产欧美一区二区三区| 美女扒开腿让男人桶爽久久动漫| 8x8x8x视频在线观看| 成人动漫在线一区| 97色婷婷成人综合在线观看| jizzjizzjizz亚洲| 成人美女在线观看| youjizz亚洲| 中文字幕在线视频观看| 国产精品免费人成网站| 精品国产一区二区三区| 九色在线播放| 亚洲一区二区三区中文字幕在线| 婷婷另类小说| a级片国产精品自在拍在线播放| 精品久久久久久久久国产字幕| 中文精品电影| free性欧美| 555夜色666亚洲国产免| 成人免费的视频| 欧美有码在线| 成年人视频在线看| 欧美日韩国产在线看| 噜噜噜91成人网| 欧美久久久网站| 手机看片1024久久| 亚洲欧洲日韩av| 欧美日韩调教| 忘忧草在线www成人影院| 欧美刺激午夜性久久久久久久| 丰满亚洲少妇av| 狠狠色丁香婷婷综合影院| 日本最新在线视频| 欧美另类久久久品| 99精品一区二区三区| 日韩中文字幕高清在线观看| 五月花成人网| 日韩精品最新网址| 久久久激情视频| 狠狠爱www人成狠狠爱综合网 | 羞羞视频在线观看不卡| 制服丝袜一区二区三区| 黄网站app在线观看下载视频大全官网 | 三区四区不卡| 日本中文字幕在线看| 国产乱码在线| 在线免费观看亚洲| 国产探花一区二区| 伊人久久大香线蕉无限次| 日韩一区二区三区精品| 婷婷亚洲最大| 亚洲国产免费| 欧美黄色免费| 亚洲成人毛片| 欧美大片网址| 婷婷综合亚洲| 国产河南妇女毛片精品久久久| av在线这里只有精品| 狠狠躁夜夜躁人人爽天天天天97| 日本一卡二卡四卡精品 | 51精品在线| 国产在线欧美| 久久综合99re88久久爱| 天涯成人国产亚洲精品一区av| 精品久久久久久久久久久久包黑料|