日本欧洲视频一区_国模极品一区二区三区_国产熟女一区二区三区五月婷_亚洲AV成人精品日韩一区18p

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

    日本欧洲视频一区_国模极品一区二区三区_国产熟女一区二区三区五月婷_亚洲AV成人精品日韩一区18p

              9000px;">

                        国模大尺度一区二区三区| 91丨porny丨国产入口| av在线一区二区三区| 一区二区三区四区国产精品| 极品尤物av久久免费看| 精品日本一线二线三线不卡| 精彩视频一区二区三区| 国产人成亚洲第一网站在线播放 | 欧美亚洲国产一区二区三区va| 亚洲欧美色综合| 欧美日韩精品综合在线| 国产在线精品不卡| 亚洲电影你懂得| 久久久综合网站| 在线影视一区二区三区| 精品一区二区成人精品| 亚洲美女精品一区| 精品国产1区2区3区| 91精彩视频在线| 丁香六月久久综合狠狠色| 五月开心婷婷久久| 国产精品区一区二区三区| 欧洲精品一区二区三区在线观看| 精品福利在线导航| 亚洲精品成a人| 久久精品久久99精品久久| 不卡的av电影| 午夜欧美视频在线观看| 在线观看日韩高清av| 亚洲精品视频在线| 国产精品进线69影院| 精品中文字幕一区二区小辣椒| 亚洲成av人片在线| 亚洲最新视频在线观看| 婷婷综合五月天| 国产欧美精品一区二区三区四区| 亚洲成人777| 麻豆成人免费电影| 一区二区三区在线观看视频| 亚洲精品高清在线观看| 亚洲一区二区三区四区在线观看| 亚洲午夜激情av| 国产在线一区二区综合免费视频| 日韩成人一级片| 国产成人精品在线看| 色综合天天性综合| 视频一区二区欧美| 91免费视频网| 免费在线看成人av| 99这里只有精品| 性久久久久久久久久久久| 中文字幕一区二区在线观看 | 亚洲福利一区二区| 成人高清免费观看| 久久综合国产精品| 亚洲一区二区三区四区五区中文| 懂色中文一区二区在线播放| 久久久精品免费网站| 久久99精品一区二区三区| 亚洲三级在线免费| av色综合久久天堂av综合| 精品国内二区三区| 成人午夜视频在线| 亚洲不卡av一区二区三区| 欧美一区2区视频在线观看| 国产成人免费视频网站高清观看视频 | ww久久中文字幕| 成人影视亚洲图片在线| 日韩精品一区二区三区视频| 777奇米四色成人影色区| 美国毛片一区二区| 色噜噜狠狠色综合欧洲selulu| 国产精品一区二区在线观看网站| 精品一区二区三区香蕉蜜桃| 九九精品视频在线看| 国产成人av资源| 色菇凉天天综合网| 日韩一区二区免费在线观看| 久久久蜜桃精品| 亚洲色图另类专区| 尤物视频一区二区| 久久精品国产第一区二区三区| 成人性生交大片免费| 欧美日免费三级在线| 久久先锋影音av| 亚洲精品视频观看| 激情国产一区二区| 91美女视频网站| 精品理论电影在线观看| 亚洲视频一区二区在线| 日韩电影免费在线看| 国产成人综合在线播放| 在线观看亚洲精品视频| 日韩一区二区三区观看| 中文欧美字幕免费| 亚洲444eee在线观看| 国产精品自产自拍| 色婷婷国产精品综合在线观看| 日韩欧美国产1| 艳妇臀荡乳欲伦亚洲一区| 久久99精品久久只有精品| 91丨九色丨蝌蚪丨老版| 精品国产乱码久久久久久牛牛| 亚洲精品视频一区二区| 国产成人精品亚洲日本在线桃色| 在线成人高清不卡| 中文字幕一区二区视频| 寂寞少妇一区二区三区| 欧美日韩精品欧美日韩精品一| 久久伊99综合婷婷久久伊| 亚洲综合丁香婷婷六月香| 丰满亚洲少妇av| 久久婷婷成人综合色| 男男视频亚洲欧美| 欧美日韩国产区一| 亚洲一区二区av在线| 色呦呦国产精品| 亚洲欧美另类综合偷拍| 99国产精品久久久久久久久久久| 精品成人一区二区三区四区| 奇米888四色在线精品| 欧美日韩国产高清一区二区三区 | 色先锋aa成人| 国产欧美日韩麻豆91| 国产99久久久精品| 中文字幕乱码亚洲精品一区| 国产福利一区二区| 国产欧美一区在线| 成人福利电影精品一区二区在线观看 | 欧美中文字幕一区二区三区亚洲| 国产精品色哟哟| 99国产精品国产精品毛片| 亚洲日本欧美天堂| 91国产成人在线| 在线一区二区三区做爰视频网站| 亚洲成a人片在线不卡一二三区| 色妹子一区二区| 亚洲电影在线免费观看| 欧美日韩亚洲综合一区| 日韩精品久久理论片| 日韩欧美国产一区在线观看| 麻豆国产精品官网| 国产亚洲综合在线| av男人天堂一区| 亚洲一区二区美女| 日韩女同互慰一区二区| 伦理电影国产精品| 欧美经典一区二区| 日本道精品一区二区三区| 亚洲国产日韩一区二区| 日韩三级高清在线| 国产成人在线视频网站| 亚洲激情第一区| 欧美一卡二卡三卡| 大尺度一区二区| 五月天丁香久久| 久久精品这里都是精品| 欧洲视频一区二区| 久草在线在线精品观看| 中文字幕二三区不卡| 欧美性生活影院| 国产二区国产一区在线观看| 亚洲美女区一区| 久久久噜噜噜久久人人看| 92国产精品观看| 日韩电影在线免费观看| 国产精品初高中害羞小美女文| 欧美三片在线视频观看| 国产精品456露脸| 五月激情六月综合| 中文在线一区二区| 日韩色视频在线观看| 91成人免费网站| 成人动漫一区二区在线| 麻豆国产精品视频| 亚洲成a人片综合在线| 国产精品久久久久影院| 精品捆绑美女sm三区| 欧美日韩aaaaaa| 在线精品视频一区二区三四| 国产精品一区二区在线看| 人人爽香蕉精品| 亚洲精品高清在线观看| 国产精品视频一二三区 | 91精品办公室少妇高潮对白| 国产剧情在线观看一区二区| 天天影视色香欲综合网老头| 亚洲一区二区三区视频在线播放| 欧美精彩视频一区二区三区| 欧美精品一区二区三区一线天视频| 欧美另类高清zo欧美| 欧美午夜精品久久久久久超碰 | 91美女片黄在线观看| 懂色av一区二区在线播放| 久久99最新地址| 免费看日韩a级影片| 天天综合色天天| 蜜桃av一区二区在线观看| 轻轻草成人在线| 人禽交欧美网站|