狠狠综合久久久久综合网址-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>
    污视频免费在线观看网站| 黄色小视频大全| av日韩在线看| 蜜臀av无码一区二区三区| 欧美精品自拍视频| av免费网站观看| 日本三级免费观看| 国产一级爱c视频| 91亚洲精品久久久蜜桃借种| 激情成人开心网| 日韩少妇内射免费播放18禁裸乳| 玖玖精品在线视频| www.超碰97.com| 色呦呦网站入口| 黄色片久久久久| 久久久国产精华液999999| 污污网站免费观看| www.久久久久久久久久久| www.桃色.com| 日韩精品一区二区三区久久| 亚洲涩涩在线观看| 日韩视频免费播放| 妞干网在线免费视频| 日本男人操女人| 人人妻人人做人人爽| 大地资源网在线观看免费官网 | 欧美黄色免费网址| 久久久999视频| 成人免费毛片网| 韩日视频在线观看| 女同性恋一区二区| www.黄色网址.com| 99视频免费播放| 97国产在线播放| 美女福利视频在线| 欧美 国产 综合| 男人添女人下面高潮视频| 精品久久一二三| 向日葵污视频在线观看| 韩日视频在线观看| 黄色av免费在线播放| 簧片在线免费看| 国产 欧美 日韩 一区| 欧美精品一区免费| 亚洲国产高清av| 男人搞女人网站| 日本三级中文字幕在线观看| 男同互操gay射视频在线看| 久久在线中文字幕| 亚洲精品一二三四五区| 一本大道东京热无码aⅴ| 成人毛片一区二区| 亚洲最大天堂网| 色男人天堂av| 青娱乐精品在线| 视色,视色影院,视色影库,视色网| 一本久道中文无码字幕av| 日本一区二区免费高清视频| 女性隐私黄www网站视频| 青草网在线观看| 成人性做爰片免费视频| 欧美女同在线观看| 性欧美18一19内谢| 久久精品久久99| 亚洲男人天堂色| 丰满少妇大力进入| 中文字幕免费高清在线| 欧美激情国产精品日韩| 91黄色小网站| 美女一区二区三区视频| 999在线观看视频| aa在线免费观看| 日本高清视频免费在线观看| 日韩黄色片在线| 在线免费观看视频黄| 久久久精品高清| 九色porny自拍| 亚洲最新免费视频| 加勒比海盗1在线观看免费国语版| 国产免费中文字幕| 五月婷婷激情久久| 在线播放免费视频| 亚洲 欧洲 日韩| 日韩精品综合在线| 久久久999免费视频| av动漫免费看| 在线视频观看一区二区| 轻点好疼好大好爽视频| 一女被多男玩喷潮视频| 手机看片日韩国产| 狠狠爱免费视频| 亚洲黄色片免费看| www国产精品内射老熟女| 91插插插插插插插插| 国产尤物av一区二区三区| aaaaaa亚洲| 欧美日韩福利在线| 亚洲久久中文字幕| 18禁网站免费无遮挡无码中文| 97xxxxx| 美女在线免费视频| 亚洲熟妇av日韩熟妇在线| www.51色.com| 亚洲激情在线观看视频| 三级网在线观看| 免费看黄色一级大片| 欧美丰满熟妇bbbbbb百度| 国内精品国产三级国产99| 国产美女18xxxx免费视频| 国产白丝袜美女久久久久| 黄色污污在线观看| 久久久九九九热| 国产亚洲天堂网| 男人的天堂99| www.中文字幕在线| 欧美爱爱视频免费看| 黄色国产一级视频| 天天摸天天碰天天添| 欧美日韩第二页| 久草精品在线播放| av丝袜天堂网| 制服丝袜中文字幕第一页| 亚洲黄色av网址| 久久精品视频在线观看免费| 午夜视频在线网站| 欧美大片免费播放| 日韩免费在线观看av| 少妇一级淫免费播放| www.夜夜爽| 乱熟女高潮一区二区在线| 可以看毛片的网址| 欧美伦理片在线观看| 激情久久综合网| 男人天堂手机在线视频| 玩弄中年熟妇正在播放| 99视频在线视频| 不卡中文字幕在线| 国产麻花豆剧传媒精品mv在线| 91日韩视频在线观看| 黄色一级片av| 91免费视频黄| 欧美综合在线观看视频| 国产成人一区二区三区别| 蜜臀一区二区三区精品免费视频| 草草草视频在线观看| 五月花丁香婷婷| 日本一极黄色片| 黄色一级在线视频| www成人免费| 91.com在线| 国产日韩亚洲欧美在线| 特级西西444| 久久久久久综合网| 天美一区二区三区| 久热在线视频观看| 国产又大又长又粗又黄| 丰满女人性猛交| 黄色a级片免费看| 欧美乱大交xxxxx潮喷l头像| 91午夜在线观看| 日韩a在线播放| 性猛交ⅹ×××乱大交| 91福利免费观看| 三级黄色片播放| 一级性生活视频| 亚洲人精品午夜射精日韩| 成年人视频观看| 黄色一级免费大片| 午夜精品久久久久久久99热影院| 色播五月综合网| 精品视频免费在线播放| 成人免费毛片播放| 国产在线视频在线| 婷婷丁香激情网| 国产 欧美 日本| 我看黄色一级片| 欧美啪啪免费视频| 亚洲一二三av| 女人另类性混交zo| 日本三级中文字幕在线观看| 亚洲 高清 成人 动漫| 午夜大片在线观看| 可以免费在线看黄的网站| 中文字幕丰满乱码| 日本十八禁视频无遮挡| 欧美性猛交久久久乱大交小说 | 奇米精品一区二区三区| 手机av在线免费| 国产69精品久久久久999小说| 国产1区2区在线| 一级网站在线观看| 久久久久国产一区| 国产视频在线视频| 欧美在线观看www| 国模无码视频一区二区三区| 少妇高潮大叫好爽喷水| 天天做天天爱天天高潮| 国产日韩欧美大片| 中文字幕精品在线播放| 黄大色黄女片18第一次|