爱情鸟第一论坛com高清免费_91免费精品国自产拍在线可以看_亚洲一区精品中文字幕_男人操心女人的视频

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)-大理旅游
    油炸竹蟲
    油炸竹蟲
    酸筍煮魚(雞)
    酸筍煮魚(雞)
    竹筒飯
    竹筒飯
    香茅草烤魚
    香茅草烤魚
    檸檬烤魚
    檸檬烤魚
    昆明西山國家級風景名勝區
    昆明西山國家級風景名勝區
    昆明旅游索道攻略
    昆明旅游索道攻略
  • 短信驗證碼平臺 理財 WPS下載

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

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

    爱情鸟第一论坛com高清免费_91免费精品国自产拍在线可以看_亚洲一区精品中文字幕_男人操心女人的视频
    <strike id="bfrlb"></strike><form id="bfrlb"><form id="bfrlb"><nobr id="bfrlb"></nobr></form></form>

        <sub id="bfrlb"><listing id="bfrlb"><menuitem id="bfrlb"></menuitem></listing></sub>

          <form id="bfrlb"></form>

            <form id="bfrlb"></form>

              <address id="bfrlb"></address>

              <address id="bfrlb"></address>
              国产精品一二| 国产精品久久久久秋霞鲁丝| 亚洲人久久久| 久久综合成人精品亚洲另类欧美| 欧美福利视频网站| 亚洲欧美久久久| 亚洲国产精品成人va在线观看| 在线不卡视频| 欧美不卡视频一区| 欧美精品播放| 欧美国产综合视频| 榴莲视频成人在线观看| 欧美裸体一区二区三区| 国产三区二区一区久久| 欧美一区二区免费| 国产日产高清欧美一区二区三区| 国产日韩在线不卡| 黄色欧美成人| 国产一区视频观看| 欧美在线|欧美| 亚洲第一二三四五区| 欧美激情精品久久久| 亚洲欧美国产制服动漫| 亚洲欧美日韩综合一区| 激情欧美日韩| 狠狠色香婷婷久久亚洲精品| 久久不见久久见免费视频1| 国产一区二区三区视频在线观看| 国产日产亚洲精品| 久久亚洲视频| 欧美高清在线视频观看不卡| 欧美成人国产一区二区| 国产精品v欧美精品v日韩| 美女久久网站| 国产欧美日韩免费看aⅴ视频| 伊人春色精品| 狠狠爱综合网| 欧美日韩1区2区| 亚洲性av在线| 亚洲系列中文字幕| 国产乱码精品一区二区三区不卡| 欧美欧美天天天天操| 黄色亚洲大片免费在线观看| 国产精品福利影院| 亚洲黄色一区二区三区| 欧美日韩欧美一区二区| 久久综合影视| 亚洲日本理论电影| 日韩午夜电影av| 欧美日韩 国产精品| 老司机精品久久| 亚洲免费黄色| 亚洲精品视频在线观看网站| 国产欧美日韩三级| 欧美日本亚洲韩国国产| 欧美一区二区三区视频| 一本大道久久精品懂色aⅴ| 国产中文一区二区三区| 欧美日韩国产专区| 激情国产一区二区| 国产日韩欧美制服另类| 开元免费观看欧美电视剧网站| 国产精品一区二区黑丝| 日韩亚洲精品电影| 亚洲日本va午夜在线影院| 国产精品理论片在线观看| 亚洲男人的天堂在线aⅴ视频| 国产精品看片资源| 国产目拍亚洲精品99久久精品| 一区二区三区免费在线观看| 久久亚洲国产精品日日av夜夜| 久久国产精品久久精品国产| 久久久精品五月天| 国产一级揄自揄精品视频| 欧美精品二区三区四区免费看视频| 免费成人av资源网| 99精品99久久久久久宅男| 91久久久久久国产精品| 国产精品久久久久久久久久妞妞| 欧美精品在线一区二区三区| 在线观看视频亚洲| 国产性做久久久久久| 国产一区二区中文| 亚洲天堂成人在线观看| 亚洲影院免费观看| 亚洲婷婷国产精品电影人久久| 亚洲自拍偷拍网址| 亚洲午夜日本在线观看| 国产深夜精品福利| 欧美三日本三级三级在线播放| 艳女tv在线观看国产一区| 欧美日韩国产黄| 国产精品私房写真福利视频| 一区二区三区欧美在线| 久久久久国产精品www| 欧美日韩国产一级| 亚洲精品视频在线观看免费| 亚洲第一精品福利| 国产精品永久免费| 国产精品久久久久aaaa樱花| 亚洲国产精品一区二区www在线| 亚洲欧美综合精品久久成人| 欧美日韩一区二区视频在线| 欧美精品日韩www.p站| 亚洲一级片在线看| 欧美日韩亚洲系列| 欧美阿v一级看视频| 在线观看欧美视频| 午夜精品视频网站| 在线观看日韩av电影| 国产欧美一区二区三区在线看蜜臀| 午夜精品久久久久影视| 亚洲高清二区| 亚洲一级二级| 国产精品毛片a∨一区二区三区|国| 国产精品一香蕉国产线看观看| 女女同性女同一区二区三区91| 亚洲精品视频中文字幕| 欧美日韩另类综合| 亚洲一区二区三区777| 亚洲免费不卡| 91久久国产精品91久久性色| 久久久久久久网站| 久色成人在线| 国产精品男人爽免费视频1| 日韩视频国产视频| 亚洲永久精品大片| 欧美一级精品大片| 久久久99久久精品女同性| 99在线精品观看| 99国内精品久久久久久久软件| 久久精品视频导航| 欧美一区二区视频在线| 国产麻豆精品theporn| 久久精品国产成人| 久久福利影视| 尤妮丝一区二区裸体视频| 欧美mv日韩mv国产网站| 日韩亚洲综合在线| 国产精品日韩欧美大师| 亚洲欧美日韩高清| 国产精品福利网| 久久午夜色播影院免费高清| 亚洲综合日韩在线| 国语对白精品一区二区| 亚洲天堂av在线免费| 国产日韩欧美一区在线| 久久精品国亚洲| 亚洲国产裸拍裸体视频在线观看乱了中文| 国产综合一区二区| 欧美一区二区福利在线| 国产日韩1区| 亚洲在线视频观看| 久久久久**毛片大全| 欧美激情精品久久久久| 亚洲欧美日本国产专区一区| 欧美在线免费一级片| 国产亚洲精品久| 免费在线一区二区| 国产精品美女久久久久aⅴ国产馆| 午夜视频一区在线观看| 狠狠久久婷婷| 亚洲一区二区三区精品动漫| 国产精品任我爽爆在线播放| 国产精品久久久久久久久免费樱桃| 韩国在线一区| 国产偷久久久精品专区| 欧美成人资源| 亚洲黄网站黄| 亚洲精品一二| 欧美成人xxx| 欧美日韩免费观看一区=区三区| 久久aⅴ国产欧美74aaa| 久久亚洲春色中文字幕久久久| 久久久久综合一区二区三区| 久久精品夜色噜噜亚洲a∨| 亚洲国产精品久久久久久女王| 欧美成人免费网站| 国产一区二区三区不卡在线观看| 亚洲国产人成综合网站| 亚洲人成人77777线观看| 国产一区二区三区高清在线观看| 久久久精品国产免大香伊| 欧美日韩亚洲网| 欧美激情1区2区| 欧美国产亚洲视频| 亚洲激情影视| 欧美激情一区| 亚洲女女女同性video| 欧美一区二区三区婷婷月色| 免费91麻豆精品国产自产在线观看| 蜜臀99久久精品久久久久久软件| 国产精品国产a| 久久久久一区二区三区四区| 亚洲福利视频二区| 欧美v国产在线一区二区三区| 国产一区二区三区最好精华液| 亚洲国产小视频| 激情综合电影网| 欧美一区二区三区啪啪|