日本欧洲视频一区_国模极品一区二区三区_国产熟女一区二区三区五月婷_亚洲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

              欧美亚洲三区| 亚洲国产电影| 欧美精品一区二| 亚洲欧美在线免费观看| 亚洲激情av| 国产精品主播| 国产精品v日韩精品| 男男成人高潮片免费网站| 欧美在线不卡视频| 亚洲无线视频| av成人手机在线| 亚洲国产精品一区二区第一页| 国产欧美日韩精品在线| 欧美无砖砖区免费| 欧美色区777第一页| 欧美日韩国产123| 欧美成人在线网站| 美女91精品| 免费观看国产成人| 免费在线国产精品| 老司机午夜精品视频| 久久久久久伊人| 久久国产天堂福利天堂| 午夜精品久久久久99热蜜桃导演| 亚洲狼人精品一区二区三区| 亚洲黄色视屏| 日韩一区二区精品葵司在线| 亚洲精品美女久久7777777| 亚洲日本在线观看| 亚洲九九爱视频| 日韩网站在线观看| 一本色道88久久加勒比精品| 一本色道久久综合亚洲精品小说| 亚洲欧洲日本国产| 日韩一级黄色av| 亚洲视频专区在线| 欧美一区二区视频97| 久久久青草婷婷精品综合日韩| 久久久国产一区二区| 蜜臀va亚洲va欧美va天堂| 欧美激情亚洲另类| 欧美日韩国产首页在线观看| 欧美午夜电影一区| 国产日韩精品一区二区三区| 红桃视频国产精品| 99视频精品在线| 国产精品99久久99久久久二8| 亚洲欧美日韩久久精品 | 欧美日韩国产综合网 | 亚洲精品日日夜夜| 一区二区欧美国产| 久久精品91| 欧美激情视频一区二区三区不卡| 国产精品mv在线观看| 国产欧美日韩精品在线| 在线观看日韩www视频免费| 亚洲另类在线视频| 亚洲欧美精品在线| 欧美第一黄色网| 国产日韩亚洲欧美综合| 亚洲激情社区| 久久国产精品高清| 欧美日韩八区| 永久域名在线精品| 性欧美1819性猛交| 欧美日韩一区二区视频在线 | 欧美性大战久久久久| 国产欧美一区二区三区国产幕精品| 一区二区在线视频播放| 亚洲自拍偷拍麻豆| 欧美日韩p片| 亚洲成色最大综合在线| 欧美一级片在线播放| 欧美激情中文字幕一区二区| 国产亚洲精品资源在线26u| 日韩视频精品| 久久国产精品72免费观看| 欧美一区2区视频在线观看| 欧美ed2k| 国内精品久久久久影院 日本资源| 99精品视频一区| 欧美激情在线有限公司| 激情综合在线| 午夜精品一区二区三区在线播放| 欧美日韩成人综合天天影院| 亚洲国产成人久久综合一区| 久久精品国产99国产精品| 国产精品亚洲不卡a| 亚洲一区二区高清| 欧美三级第一页| 99精品国产在热久久下载| 欧美黄色免费| 亚洲欧洲日本一区二区三区| 欧美激情片在线观看| 在线成人激情黄色| 久久久女女女女999久久| 国产中文一区二区| 久久久久国产一区二区| 黄色亚洲免费| 美女诱惑一区| 亚洲精品网站在线播放gif| 欧美精品大片| 亚洲午夜女主播在线直播| 国产精品久久久久久户外露出 | 欧美女激情福利| 亚洲乱码国产乱码精品精可以看| 欧美黄色网络| 日韩午夜av电影| 欧美肉体xxxx裸体137大胆| 99视频精品免费观看| 国产精品亚洲网站| 欧美在线黄色| 亚洲国产三级网| 欧美视频免费在线观看| 午夜在线视频一区二区区别| 国产原创一区二区| 免费在线亚洲| 在线亚洲欧美视频| 国产日韩欧美综合| 欧美69视频| 在线视频欧美日韩| 韩国精品一区二区三区| 欧美成人黑人xx视频免费观看| 日韩一二三在线视频播| 国产欧美一区二区三区久久| 麻豆精品网站| 中文亚洲欧美| 在线视频国产日韩| 欧美日韩一区二区在线观看视频| 香蕉成人久久| 日韩午夜av| 国产欧美日韩亚洲一区二区三区| 久久亚洲私人国产精品va| 亚洲人成网站影音先锋播放| 国产精品久久国产三级国电话系列 | 久久福利视频导航| 中国女人久久久| 在线国产亚洲欧美| 国产精品国产三级国产专播品爱网| 久久精品国产亚洲一区二区三区| 一区二区三区欧美成人| 在线 亚洲欧美在线综合一区| 欧美日韩久久不卡| 免费亚洲电影在线观看| 午夜视频一区| 亚洲小少妇裸体bbw| 亚洲人成网站在线观看播放| 国产视频久久久久久久| 国产精品高潮呻吟久久| 欧美久久在线| 欧美成人情趣视频| 老司机成人网| 久久久.com| 欧美一区二区三区在线免费观看 | 欧美日韩国产精品一区二区亚洲| 久久久国产精品亚洲一区| 亚洲一区二区三区涩| 一级日韩一区在线观看| 91久久在线观看| 亚洲高清免费视频| 在线高清一区| 精品88久久久久88久久久| 国产一区日韩欧美| 红桃视频一区| 国产一区二区三区直播精品电影 | 羞羞视频在线观看欧美| 亚洲综合欧美日韩| 亚洲欧洲av一区二区| 亚洲——在线| 性欧美大战久久久久久久免费观看| 亚洲视频1区2区| 亚洲一区二区黄| 欧美一区二区成人6969| 欧美中文字幕在线| 久久久午夜电影| 蜜桃久久av| 欧美精品一区二区三区高清aⅴ| 欧美xart系列高清| 欧美日韩国产专区| 国产精品v日韩精品| 国产三级精品在线不卡| 国产一区二区三区久久悠悠色av | 久久精品视频在线看| 久久久国产成人精品| 欧美激情偷拍| 国产精品人人做人人爽| 国产一区二区精品久久91| 亚洲国产精品va| 夜夜嗨av一区二区三区四季av| 亚洲视频狠狠| 久久人人九九| 欧美日韩亚洲国产精品| 国产区精品在线观看| 亚洲黄色免费电影| 在线亚洲国产精品网站| 久久精品国产久精国产爱| 欧美成人免费网站| 国产麻豆91精品| 亚洲区欧美区| 欧美在线视频免费|