精品深夜AV无码一区二区_伊人久久无码中文字幕_午夜无码伦费影视在线观看_伊人久久无码精品中文字幕

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

時(shí)間:2024-04-30  來源:  作者: 我要糾錯(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
  • 無相關(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

    精品深夜AV无码一区二区_伊人久久无码中文字幕_午夜无码伦费影视在线观看_伊人久久无码精品中文字幕
    <samp id="e4iaa"><tbody id="e4iaa"></tbody></samp>
    <ul id="e4iaa"></ul>
    <blockquote id="e4iaa"><tfoot id="e4iaa"></tfoot></blockquote>
    • <samp id="e4iaa"><tbody id="e4iaa"></tbody></samp>
      <ul id="e4iaa"></ul>
      <samp id="e4iaa"><tbody id="e4iaa"></tbody></samp><ul id="e4iaa"></ul>
      <ul id="e4iaa"></ul>
      <th id="e4iaa"><menu id="e4iaa"></menu></th>
      午夜啪啪小视频| 老熟妇高潮一区二区高清视频| 色香蕉在线视频| 精品久久久久久中文字幕2017| 永久久久久久久| 久久久久久福利| 国产女人爽到高潮a毛片| 一级α片免费看刺激高潮视频| 日韩一级片免费在线观看| 精品一区免费观看| 国产伦精品一区二区三区视频网站 | 91网址在线播放| 人妻精品一区二区三区| 九九热国产视频| 精品丰满少妇一区二区三区| 动漫av一区二区三区| a天堂在线视频| a级在线免费观看| wwwxxx亚洲| av在线播放网址| 亚洲欧美日韩色| 一个人看的www日本高清视频| 亚洲精品久久久久久宅男 | 亚洲欧美一区二区三区在线观看| 天天干天天综合| 天天爽夜夜爽夜夜爽精品| 欧美福利第一页| 免费黄色网址在线| 青青草精品在线| 任你躁av一区二区三区| 人妻少妇精品无码专区久久| 欧美日韩中文字幕在线观看| 日韩视频在线观看一区二区三区| 六月婷婷七月丁香| 人人妻人人澡人人爽精品日本| 日韩精品成人在线| 一级做a爰片久久毛片| 中文字幕av久久爽| 亚洲中文字幕无码一区| 97在线公开视频| 国产一区二区波多野结衣| 麻豆疯狂做受xxxx高潮视频| 日韩精品一区二区三区国语自制| 五月婷婷综合久久| 91美女精品网站| 好吊色一区二区三区| 免费一级做a爰片久久毛片潮| 欧美特黄aaaaaa| 日韩一区二区三区不卡| 中文字幕一区二区三区四区视频| 亚洲综合激情视频| 国内精品卡一卡二卡三| 欧美一级淫片免费视频魅影视频 | 国产精品久久久免费看| 精品视频一二三区| 无码人妻久久一区二区三区不卡| 在线观看岛国av| 国产乱淫av片| 午夜精品久久久久久久第一页按摩| 中文字幕精品视频在线| 国产成人精品一区二三区| 久久免费少妇高潮99精品| 中文字幕欧美人妻精品| 国产一区二区波多野结衣| 欧美视频国产视频| 69av.com| 日韩欧美国产成人精品免费 | 欧美日韩免费做爰视频| 亚洲熟女乱综合一区二区三区 | 亚洲欧美日韩综合在线| 精品日韩久久久| 亚洲av色香蕉一区二区三区| 绯色av蜜臀vs少妇| 日韩色图在线观看| 国产乱淫a∨片免费视频| 天堂在线中文网| 国产精品午夜一区二区| 亚洲精品免费一区亚洲精品免费精品一区 | 亚洲不卡免费视频| 国产伦精品一区二区三区88av| 欧美特级特黄aaaaaa在线看| av激情在线观看| 午夜国产在线观看| 欧美成人精品欧美一级乱黄| 波多野结衣一二三四区| 中文字幕一区二区三区四区欧美 | 久久国产视频精品| 99热这里只有精品在线| 无码人妻一区二区三区线| 久久久久久久国产视频| av网在线播放| 亚洲精品乱码久久久久久蜜桃图片 | 欧美成人精品欧美一| 97人妻天天摸天天爽天天| 色综合久久久无码中文字幕波多| 国产性xxxx高清| 国产suv精品一区二区68| 亚洲精品18在线观看| 日韩va在线观看| 欧美日韩国产精品综合| 国精品无码人妻一区二区三区| 亚洲一区在线观| 亚洲毛片亚洲毛片亚洲毛片| 亚洲成人一级片| 在线观看av中文字幕| 午夜av免费在线观看| 三上悠亚在线一区| 日韩欧美国产另类| 天天干天天干天天干天天干天天干| 久久在线视频精品| 精品肉丝脚一区二区三区| 国模无码一区二区三区| 国产一区二区波多野结衣| 国产一区二区三区四区视频 | 国产精品国产三级国产aⅴ| 97人妻天天摸天天爽天天| 91精品人妻一区二区三区四区 | 亚洲精品免费一区亚洲精品免费精品一区 | 在线精品视频播放| 亚洲精品第五页| 一级黄色片免费| 朝桐光av在线| 国产一级特黄毛片| 美日韩一二三区| 欧美三级午夜理伦| 日韩一级片中文字幕| 香蕉免费毛片视频| 亚洲精品免费在线观看视频| 88av在线播放| 国产手机精品视频| 久久久久久少妇| 天天干天天操av| 亚洲国产精品成人综合久久久 | 久久久男人的天堂| 日日摸天天添天天添破| 香港三日本三级少妇66| 亚洲精品国产精品乱码视色| 成人欧美精品一区二区| 麻豆精品免费视频| 在线观看免费的av| 国产成人av片| 日本免费网站在线观看| 91成人精品一区二区| 国产一区二区视频免费| 人妻体内射精一区二区三区| 在线精品一区二区三区| 国产成人精品亚洲男人的天堂| 精品人妻互换一区二区三区| 婷婷中文字幕在线观看| 成人免费区一区二区三区| 男女性高潮免费网站| 一区二区三区四区毛片| 国产一级18片视频| 亚洲av无码一区二区三区网址| 丰满人妻av一区二区三区| 日本不卡一二区| 粉嫩aⅴ一区二区三区| 少妇高潮惨叫久久久久| 亚洲图片欧美在线| 久久久久亚洲av无码专区首jn| 无码精品人妻一区二区| 国产精品色综合| 亚洲 另类 春色 国产| 国产精品一区二区免费视频| 色婷婷综合网站| 国产一卡二卡在线| 亚洲欧美久久久久| 日本三级一区二区| www.色欧美| 少妇激情一区二区三区视频| 不卡av中文字幕| 一区二区视频网站| 欧美 日韩 人妻 高清 中文| 91久久精品无码一区二区| 欧美一区二区激情视频| 国产精品7777| 一本到在线视频| 天天综合网久久| 欧美精品一区二区蜜桃| 国产伦一区二区| 99免费观看视频| 中文久久久久久| 日日噜噜噜噜人人爽亚洲精品 | 精品人妻人人做人人爽夜夜爽| 伊人成年综合网| 久久久久亚洲av成人无码电影| 亚洲视频 欧美视频| 五月天婷婷网站| 欧美综合视频在线| 精品人妻二区中文字幕| 国产精品久久久久久免费播放| 亚洲免费在线观看av| 小泽玛利亚一区二区免费| 欧美 日韩 综合| 毛片久久久久久| 久久视频免费在线观看| 九九热在线免费观看| 国产中文字幕一区二区| 国产一二三四五区| 精品国产一区在线|