亚洲十八**毛片_亚洲综合影院_五月天精品一区二区三区_久久久噜噜噜久久中文字幕色伊伊 _欧美岛国在线观看_久久国产精品毛片_欧美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

    91九色porn在线资源| 中文乱码免费一区二区| 亚洲成人国产| 久久av中文| 91视频在线观看| 天天干天天草| 成人网18免费软件大全| 天天精品视频| heyzo欧美激情| 欧美aaa视频| 国产激情视频在线看| 亚洲一区在线| 美女视频第一区二区三区免费观看网站| 久久国产欧美日韩精品| 一区二区三区在线观看网站| 亚洲成人精品一区| 天天综合网 天天综合色| 99re热这里只有精品免费视频| 国产一区二区三区久久久久久久久| 偷拍精品福利视频导航| 日本精品在线观看| 国产精品手机在线播放| 成人免费图片免费观看| 综合久久综合久久| 亚洲国产精品一区| 亚洲精品在线影院| 男女小视频在线观看| 国产校园另类小说区| 黑人巨大精品欧美一区二区| 欧美日韩精品久久久| 亚洲成人av电影在线| 亚洲三级电影在线观看| 精品香蕉视频| 亚洲精华国产欧美| 成人听书哪个软件好| 亚洲蜜臀av乱码久久精品| 欧美日韩国产电影| 亚洲女人天堂| 亚洲电影有码| 伊人成综合网| 成人爱爱电影网址| 亚洲成av人影院在线观看网| 调教视频vk| 91破解版在线观看| 美女少妇全过程你懂的久久| 日韩高清一级片| 一区二区三区四区激情| 1024欧美极品| 日韩精品av| 一级欧洲+日本+国产| 成人av电影在线| 欧美午夜影院一区| 大胆av不用播放器在线播放| 亚洲欧洲专区| 久热精品在线| 亚洲免费av高清| h网站在线播放| 日韩a**中文字幕| 亚洲视频观看| 亚洲欧美影音先锋| 国产精品久久久久永久免费看| 日本在线视频www鲁啊鲁| 欧美久久综合网| 久久人人超碰精品| 精品国产三级a在线观看| 97超碰免费在线| 亚洲久久久久| 亚洲欧美日韩在线不卡| 最新av在线| 好吊妞视频这里有精品| 成人深夜视频在线观看| 日韩免费看网站| 欧美成人精品三级网站| 久久久亚洲人| 欧美日韩国产区一| 美女露胸视频在线观看| 国产亚洲综合精品| 一本久久a久久免费精品不卡| 伦xxxx在线| 国模大胆一区二区三区| 亚洲主播在线播放| 香蕉视频免费在线播放| 婷婷综合伊人| 亚洲国产精品一区二区久久| av大全在线免费看| 91精品国产自产在线观看永久∴| 亚洲天堂成人在线观看| 1769在线观看| 欧美天天视频| 色婷婷久久99综合精品jk白丝| 色婷婷在线播放| 免费在线观看成人av| 色天使色偷偷av一区二区| 黄色在线观看www| 免费精品99久久国产综合精品| 91精品国模一区二区三区| 欧美成人毛片| 久久亚洲精品国产精品紫薇| 中文字幕一区免费| 99久久99视频只有精品| 午夜激情综合网| 男插女视频久久久| 麻豆视频观看网址久久| 九色丨porny丨| 免费成人高清在线视频theav| 亚洲色图丝袜美腿| 日韩免费影院| 国产一区二区中文字幕| 一级网站免费观看| 亚洲一区在线| 91.com在线观看| 久久九九精品视频| 中文字幕亚洲一区二区av在线 | 欧美一区二区三区精品| 欧美黄页在线免费观看| 久久日韩精品一区二区五区| av色图一区| 日韩va亚洲va欧美va久久| 欧美狂欢多p性派对| 秋霞欧美视频| 欧美日韩电影在线| 牛牛视频精品一区二区不卡| 亚洲成a人片在线不卡一二三区| 久久夜夜操妹子| 国产日产欧美一区| sis001亚洲原创区| 97精品久久久久中文字幕| 成人看片免费| 大白屁股一区二区视频| www.视频在线.com| 国产一区在线视频| 理论视频在线| 黑人巨大精品欧美一区| 国产在线视频网| 狠狠色综合播放一区二区| 日韩专区一区二区| 日本麻豆一区二区三区视频| 四虎精品在永久在线观看| 久久国产88| 色影视在线视频资源站| 视频一区在线播放| 每日更新在线观看av| 日韩在线一二三区| 蜜桃免费在线| 国产成人一级电影| av在线下载| 国产亚洲欧美日韩在线一区| 国产一二在线播放| 一区免费观看视频| 亚洲国产一区二区久久| 精品日韩美女的视频高清| 欧美日韩直播| 欧美一区二区在线看| 成人影院在线| 成人影院一区二区三区| 丝袜国产日韩另类美女| 成人性生交大片免费看午夜 | 精品综合久久88少妇激情| 欧美网站在线观看| 日韩在线理论| 99热在线网站| 国产精品一区二区三区99| 国模雨婷捆绑高清在线| 一级女性全黄久久生活片免费| 看全色黄大色大片免费久久久| 日韩一区二区三区视频在线| 在线免费高清一区二区三区| 毛片免费在线| 久久久久久久av麻豆果冻| 国产一区二区三区| 欧美日韩激情一区| 亚洲免费观看| 欧美三级理伦电影| 亚洲欧洲国产日韩| 偷拍视屏一区| 日本欧美亚洲| 99久精品国产| 久久久久久久久成人| 欧美一卡在线观看| 奇米精品一区二区三区四区| 国产不卡人人| 在线观看一区不卡| 亚洲一区区二区| 国产777精品精品热热热一区二区| 亚洲国产综合人成综合网站| 911精品美国片911久久久| 天堂а√在线8种子蜜桃视频| 久久精品亚洲国产奇米99| 国产精品天天看天天狠| 成人福利资源| 久久久久久久久蜜桃| 欧美a大片欧美片| 桃乃木かなav在线播放| 久久亚洲捆绑美女| 欧美日韩国产高清电影| 青青草av免费在线观看| 一区二区成人在线视频| 好看的日韩av电影| av在线资源| 精品乱码亚洲一区二区不卡|