狠狠综合久久久久综合网址-a毛片网站-欧美啊v在线观看-中文字幕久久熟女人妻av免费-无码av一区二区三区不卡-亚洲综合av色婷婷五月蜜臀-夜夜操天天摸-a级在线免费观看-三上悠亚91-国产丰满乱子伦无码专区-视频一区中文字幕-黑人大战欲求不满人妻-精品亚洲国产成人蜜臀av-男人你懂得-97超碰人人爽-五月丁香六月综合缴情在线

CSC 256代寫、C++設計編程代做

時間:2024-04-30  來源:  作者: 我要糾錯



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%

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


















 

標簽:

掃一掃在手機打開當前頁
  • 上一篇:代做FINM7008、代寫FINM7008 Applied Investments
  • 下一篇:COMP30024代做、代寫 Game of Tetress
  • 無相關信息
    昆明生活資訊

    昆明圖文信息
    蝴蝶泉(4A)-大理旅游
    蝴蝶泉(4A)-大理旅游
    油炸竹蟲
    油炸竹蟲
    酸筍煮魚(雞)
    酸筍煮魚(雞)
    竹筒飯
    竹筒飯
    香茅草烤魚
    香茅草烤魚
    檸檬烤魚
    檸檬烤魚
    昆明西山國家級風景名勝區
    昆明西山國家級風景名勝區
    昆明旅游索道攻略
    昆明旅游索道攻略
  • NBA直播 短信驗證碼平臺 幣安官網下載 歐冠直播 WPS下載

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

    Copyright © 2025 kmw.cc Inc. All Rights Reserved. 昆明網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    狠狠综合久久久久综合网址-a毛片网站-欧美啊v在线观看-中文字幕久久熟女人妻av免费-无码av一区二区三区不卡-亚洲综合av色婷婷五月蜜臀-夜夜操天天摸-a级在线免费观看-三上悠亚91-国产丰满乱子伦无码专区-视频一区中文字幕-黑人大战欲求不满人妻-精品亚洲国产成人蜜臀av-男人你懂得-97超碰人人爽-五月丁香六月综合缴情在线
  • <dl id="akume"></dl>
  • <noscript id="akume"><object id="akume"></object></noscript>
  • <nav id="akume"><dl id="akume"></dl></nav>
  • <rt id="akume"></rt>
    <dl id="akume"><acronym id="akume"></acronym></dl><dl id="akume"><xmp id="akume"></xmp></dl>
    青青青青草视频| 国产深夜男女无套内射| 六月丁香婷婷在线| 精品无码一区二区三区在线| 久久www视频| 麻豆视频传媒入口| www.男人天堂网| 国产一区二区三区乱码| 国产3p露脸普通话对白| 国产美女网站在线观看| 热久久精品国产| 日本激情视频在线播放| 高清av免费看| 9色视频在线观看| 欧美 日韩 亚洲 一区| 国产又黄又大又粗视频| 免费在线观看的av网站| 韩国中文字幕av| eeuss中文| 春日野结衣av| 爽爽爽在线观看| 国产欧美日韩网站| 九一精品在线观看| 女女百合国产免费网站| 两根大肉大捧一进一出好爽视频| 成年人网站大全| 五月天在线免费视频| 91精品国产91久久久久麻豆 主演| 国产成人a亚洲精v品无码| 免费涩涩18网站入口| 4444亚洲人成无码网在线观看| 亚洲 高清 成人 动漫| 色婷婷综合网站| 午夜免费福利小电影| 天天操精品视频| 免费日韩视频在线观看| 黄色网络在线观看| 天天爽人人爽夜夜爽| 欧美一级视频在线播放| www.国产视频.com| 男女激情无遮挡| 日韩一二区视频| gogogo高清免费观看在线视频| 精品国偷自产一区二区三区| 亚欧激情乱码久久久久久久久| 国产精品视频一二三四区| 中文字幕成人在线视频| 成人一级片网站| 给我免费播放片在线观看| 一级 黄 色 片一| 日本黄大片一区二区三区| 久久久999视频| 日b视频免费观看| 超碰在线免费观看97| 日韩成人av免费| 色噜噜狠狠一区二区| 国产91在线视频观看| 可以在线看的av网站| 免费av手机在线观看| 欧美亚洲黄色片| 青青在线视频免费观看| 超碰在线免费观看97| www.51色.com| 欧美 日韩 国产 在线观看| 三级a三级三级三级a十八发禁止| 国产福利视频在线播放| 免费毛片小视频| 日本中文字幕片| 久久久精品三级| 亚洲激情在线观看视频| 亚洲人辣妹窥探嘘嘘| 中文字幕网av| 国产精品夜夜夜爽张柏芝| 国产福利精品一区二区三区| 女同激情久久av久久| 99精品视频网站| 国产精品久久久久7777| 精品少妇一区二区三区在线| av免费中文字幕| 亚洲xxx在线观看| 日韩精品福利片午夜免费观看| av在线免费观看国产| 欧美私人情侣网站| 天堂av8在线| www.xxx麻豆| 992kp快乐看片永久免费网址| 日本人69视频| 日韩一二区视频| 男人女人黄一级| 精品少妇人妻av一区二区| 日本人体一区二区| 国产探花在线看| 日韩中字在线观看| 国产无遮挡猛进猛出免费软件| 欧美 国产 精品| 日韩手机在线观看视频| 亚洲激情免费视频| 男女污污的视频| 欧美日韩激情四射| 日韩一区二区三区久久| 一本久道高清无码视频| 国内外成人免费在线视频| 日本精品久久久久久久久久| 一道本在线免费视频| 男女超爽视频免费播放| 国产在线观看中文字幕| 欧美私人情侣网站| 香港三级日本三级a视频| www.涩涩涩| 久草青青在线观看| 国产1区2区3区中文字幕| 在线观看免费黄网站| 久在线观看视频| 国产成人一二三区| а 天堂 在线| 日本特黄a级片| av免费在线播放网站| 国产aaa免费视频| 日日噜噜夜夜狠狠久久丁香五月| 九色porny自拍| 免费大片在线观看| 日韩精品综合在线| 亚洲国产一二三精品无码| 中日韩av在线播放| 色播五月综合网| 国产 porn| 亚洲三级视频网站| 麻豆一区二区三区视频| 色一情一乱一伦一区二区三区日本| 青青青免费在线| 日韩免费一级视频| av动漫免费看| 久久精品网站视频| 我看黄色一级片| 欧美大尺度做爰床戏| 91n.com在线观看| 日韩不卡一二三| www激情五月| 亚洲国产一二三精品无码| 欧美精品一区二区性色a+v| 中文字幕一区二区三区四区五区人| 91丝袜超薄交口足| 日本中文字幕一级片| 久操网在线观看| 欧美伦理片在线看| 欧美国产日韩在线视频| 男人天堂成人网| 伊人成色综合网| 邪恶网站在线观看| 亚洲av毛片在线观看| 91精品国产91久久久久麻豆 主演| 欧美精品卡一卡二| 亚洲色精品三区二区一区| 成人综合久久网| 欧美狂野激情性xxxx在线观| 国产精品无码人妻一区二区在线| 亚洲精品无码久久久久久| 免费看涩涩视频| 日韩欧美猛交xxxxx无码| 激情六月丁香婷婷| 国产又爽又黄ai换脸| av免费观看国产| 91丝袜超薄交口足| 成人观看免费完整观看| 国产精品亚洲天堂| 99爱视频在线| 69精品丰满人妻无码视频a片| 欧美国产激情视频| 欧美少妇在线观看| 激情综合网俺也去| 韩日视频在线观看| 小说区视频区图片区| 一本色道无码道dvd在线观看| 黄瓜视频免费观看在线观看www| 91九色在线观看视频| 黄色一级片网址| 国产三级国产精品国产专区50| 精品无码国模私拍视频| 永久免费黄色片| 性刺激的欧美三级视频| 国产免费黄色小视频| 日韩国产精品毛片| 国产欧美激情视频| 日韩福利视频在线| av免费中文字幕| 成人在线观看你懂的| 欧美美女黄色网| 久久艹这里只有精品| 亚洲精品午夜在线观看| 欧美 国产 小说 另类| 亚洲人精品午夜射精日韩| 黄色三级中文字幕| 一级黄色录像免费看| 五月天男人天堂| 污免费在线观看| 超碰在线超碰在线| 国产大尺度在线观看| 黄色a级三级三级三级| 永久免费在线看片视频| 国产经典久久久|