成a人片国产精品_色悠悠久久综合_国产精品美女久久久久久2018_日韩精品一区二区三区中文精品_欧美亚洲国产一区在线观看网站_中文字幕一区在线_粉嫩一区二区三区在线看_国产亚洲欧洲997久久综合_不卡一区在线观看_亚洲欧美在线aaa_久久99精品国产_欧美卡1卡2卡_国产精品你懂的_日韩精品91亚洲二区在线观看_国内一区二区视频_91丨国产丨九色丨pron

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人片国产精品_色悠悠久久综合_国产精品美女久久久久久2018_日韩精品一区二区三区中文精品_欧美亚洲国产一区在线观看网站_中文字幕一区在线_粉嫩一区二区三区在线看_国产亚洲欧洲997久久综合_不卡一区在线观看_亚洲欧美在线aaa_久久99精品国产_欧美卡1卡2卡_国产精品你懂的_日韩精品91亚洲二区在线观看_国内一区二区视频_91丨国产丨九色丨pron
    麻豆中文一区二区| 国产乱码精品一品二品| 美女网站色91| 在线精品视频免费观看| 国产三级精品三级| 美女视频黄 久久| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 久久久噜噜噜久久人人看| 亚洲va欧美va天堂v国产综合| av网站免费线看精品| 久久久久久久久久久久久久久99 | 欧美无乱码久久久免费午夜一区| 国产无一区二区| 久久国产欧美日韩精品| 4hu四虎永久在线影院成人| 一区二区三区.www| 91色视频在线| 中文字幕日本不卡| 成人av一区二区三区| 日本一区二区三区久久久久久久久不| 老司机精品视频在线| 欧美一区二区网站| 石原莉奈一区二区三区在线观看| 欧美综合天天夜夜久久| 一区二区三区四区在线免费观看 | 色av综合在线| 亚洲欧美另类综合偷拍| av中文字幕不卡| 国产精品区一区二区三区| 国产成人精品1024| 欧美激情一区二区在线| 国产91精品欧美| 国产精品免费久久久久| jizz一区二区| 亚洲免费伊人电影| 91欧美一区二区| 亚洲黄色av一区| 欧美丝袜丝交足nylons图片| 亚洲伊人伊色伊影伊综合网| 日本高清不卡在线观看| 亚洲一区二区三区四区不卡| 在线免费观看视频一区| 亚洲a一区二区| 日韩一级片在线播放| 美女爽到高潮91| 国产午夜精品一区二区| www.欧美.com| 亚洲激情中文1区| 欧美性三三影院| 日本在线不卡视频| 欧美xxxx在线观看| 国产成人aaa| 亚洲欧美中日韩| 欧洲精品在线观看| 三级在线观看一区二区| 精品久久久久久久久久久久久久久| 国产真实乱子伦精品视频| 国产欧美日韩在线视频| 97精品国产97久久久久久久久久久久 | 精品日韩一区二区三区| 国产精品66部| 亚洲欧美日本在线| 欧美精品一二三| 精品一区二区三区在线观看国产 | 亚洲美女淫视频| 欧美日韩成人激情| 美女视频第一区二区三区免费观看网站| 2024国产精品视频| 成人小视频在线观看| 一区二区三区欧美视频| 欧美一区二区三区电影| 国产成人综合亚洲网站| 亚洲人成人一区二区在线观看| 欧美性猛交xxxx黑人交| 精品在线亚洲视频| 亚洲人快播电影网| 日韩视频123| 成人h动漫精品| 亚洲一区二区在线播放相泽| 日韩精品一区二区在线| 成人app软件下载大全免费| 亚洲午夜精品网| 久久综合色鬼综合色| 99国产精品久久久久久久久久| 午夜精品一区二区三区免费视频 | 亚洲国产另类精品专区| 精品少妇一区二区三区日产乱码 | 欧美一级高清片| 国产不卡在线播放| 亚洲第一福利视频在线| 久久久久久久久伊人| 色天使色偷偷av一区二区| 免费成人在线观看| 一区在线观看视频| 日韩一区二区三区在线| 97se亚洲国产综合自在线 | 欧美三级电影在线观看| 国产精品一二三区| 亚洲第一会所有码转帖| 国产拍揄自揄精品视频麻豆| 欧美日韩一区不卡| 国产91露脸合集magnet| 丝袜国产日韩另类美女| 中文字幕一区二区日韩精品绯色| 5566中文字幕一区二区电影| www.成人在线| 精品一区精品二区高清| 亚洲愉拍自拍另类高清精品| 国产午夜精品一区二区三区四区| 欧美美女一区二区| 91视频一区二区三区| 激情六月婷婷久久| 亚洲二区在线观看| 国产精品久久久爽爽爽麻豆色哟哟 | 国产在线播放一区| 亚洲一卡二卡三卡四卡五卡| 久久久久久久久久久久久久久99| 欧美人与禽zozo性伦| 成人91在线观看| 国产一区二区网址| 日本中文在线一区| 亚洲在线观看免费| ...xxx性欧美| 国产a视频精品免费观看| 视频一区二区中文字幕| 亚洲精品成人悠悠色影视| 欧美激情综合在线| 欧美电影免费观看高清完整版在线| 日本丰满少妇一区二区三区| 粉嫩aⅴ一区二区三区四区| 久88久久88久久久| 日韩成人精品视频| 一区二区欧美在线观看| 国产精品久久久久久福利一牛影视 | 美国十次了思思久久精品导航| 依依成人综合视频| 国产精品毛片大码女人| 久久久久久影视| 欧美成人一区二区三区片免费| 欧美精品一二三四| 欧美性感一类影片在线播放| 91麻豆成人久久精品二区三区| 国产成人亚洲综合a∨婷婷图片| 久久国产生活片100| 日韩va欧美va亚洲va久久| 亚洲国产欧美日韩另类综合| 亚洲免费观看在线观看| 国产精品久久久久久久久搜平片| 国产亚洲精品aa| 国产午夜亚洲精品羞羞网站| 久久久久免费观看| 2024国产精品| 久久夜色精品国产欧美乱极品| 欧美videos大乳护士334| 日韩一二三四区| 日韩一级二级三级精品视频| 91精品国产色综合久久不卡蜜臀| 欧美日韩精品免费| 欧美精品丝袜久久久中文字幕| 欧美日韩综合色| 欧美日韩国产综合久久| 欧美日韩中文一区| 777奇米四色成人影色区| 欧美另类变人与禽xxxxx| 欧美老年两性高潮| 欧美精品久久99久久在免费线| 欧美二区三区的天堂| 欧美高清一级片在线| 7777精品伊人久久久大香线蕉的 | 99久久久精品免费观看国产蜜| 国产成人免费视频| 大桥未久av一区二区三区中文| 国产福利一区二区三区视频在线| 国产成人鲁色资源国产91色综| 国产69精品久久久久777| 成人一区二区三区在线观看| 成人av在线播放网站| 91免费小视频| 欧美在线视频全部完| 欧美日本一区二区在线观看| 69久久夜色精品国产69蝌蚪网| 日韩一区二区麻豆国产| 2019国产精品| 中文字幕国产精品一区二区| 国产精品国产三级国产| 亚洲美女偷拍久久| 午夜av一区二区| 蜜臀av一区二区三区| 国产麻豆一精品一av一免费| 福利电影一区二区| 色婷婷精品久久二区二区蜜臂av| 欧美日韩在线三区| 日韩欧美一区电影| 国产三级一区二区三区| ...av二区三区久久精品| 亚洲bdsm女犯bdsm网站| 精品一区二区久久| 成人动漫av在线| 欧美亚洲另类激情小说| 日韩欧美一区在线|