免费一级欧美片在线观看网站_国产一区再线_欧美日本一区二区高清播放视频_国产99久久精品一区二区300

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

    免费一级欧美片在线观看网站_国产一区再线_欧美日本一区二区高清播放视频_国产99久久精品一区二区300
    亚洲成人免费影院| 在线观看日韩毛片| 久久久国产一区二区三区四区小说| 免费成人av在线| 日韩免费观看高清完整版| 看电视剧不卡顿的网站| 精品国产乱码久久久久久浪潮| 九色综合狠狠综合久久| 久久欧美中文字幕| 成人永久免费视频| 国产精品久久久久久久久搜平片| av在线不卡网| 亚洲天堂久久久久久久| 亚洲欧美日韩久久精品| 午夜伦理一区二区| 日韩欧美在线网站| 国产精品一二一区| 中文字幕亚洲综合久久菠萝蜜| 91精品福利在线| 91日韩在线专区| 亚洲mv大片欧洲mv大片精品| 日韩一二三四区| 国产·精品毛片| 一区二区成人在线观看| 欧美人牲a欧美精品| 久久国产免费看| 国产精品视频免费看| 欧美亚洲尤物久久| 精品在线你懂的| 国产精品久久三| 欧美日韩国产一区二区三区地区| 久久99久久99精品免视看婷婷 | 亚洲成人7777| 亚洲精品在线观看视频| av亚洲精华国产精华精| 亚洲18女电影在线观看| 久久久久国产精品麻豆ai换脸 | 久久综合久久久久88| 972aa.com艺术欧美| 日本最新不卡在线| 国产精品视频一二| 制服丝袜成人动漫| 成人av在线影院| 日本不卡一区二区三区| 国产精品网友自拍| 欧美精品18+| 成人h动漫精品一区二区| 午夜精品国产更新| 中文字幕成人网| 7777精品伊人久久久大香线蕉| 国产馆精品极品| 日日摸夜夜添夜夜添精品视频| 亚洲精品在线免费播放| 欧美亚洲国产怡红院影院| 国产麻豆一精品一av一免费| 亚洲最新视频在线播放| 国产欧美日韩三区| 91精品午夜视频| 色综合久久88色综合天天免费| 久久99精品国产.久久久久| 亚洲靠逼com| 国产亚洲成年网址在线观看| 欧美日韩国产高清一区| 成人黄色电影在线 | 国产日韩欧美一区二区三区乱码| 亚洲人精品一区| 国产成人福利片| 婷婷丁香久久五月婷婷| 国产精品久久久久天堂| 精品免费一区二区三区| 欧美性做爰猛烈叫床潮| 99视频精品全部免费在线| 久久精品国产免费| 午夜精品成人在线视频| 亚洲丝袜精品丝袜在线| 久久久天堂av| 日韩欧美高清一区| 精品视频在线免费观看| 91啦中文在线观看| 国产69精品久久久久777| 激情丁香综合五月| 午夜a成v人精品| 一区二区免费在线| 国产精品电影院| 国产视频一区在线观看| 日韩精品在线网站| 911国产精品| 欧美三级日韩三级| 一本大道av一区二区在线播放| 国产mv日韩mv欧美| 国精品**一区二区三区在线蜜桃| 奇米影视7777精品一区二区| 亚洲主播在线播放| 亚洲蜜臀av乱码久久精品蜜桃| 国产欧美日本一区视频| 久久蜜桃av一区精品变态类天堂| 欧美一区二区三区视频免费播放| 欧美网站大全在线观看| caoporm超碰国产精品| 国产亚洲一区二区在线观看| 制服.丝袜.亚洲.中文.综合| 亚洲国产另类av| 欧美肥妇毛茸茸| 青青草97国产精品免费观看| 欧美成人精品福利| 国v精品久久久网| 亚洲天堂av一区| 国产成+人+日韩+欧美+亚洲| 欧美日韩国产高清一区| 欧美在线免费播放| 色8久久精品久久久久久蜜| 91在线视频免费观看| 99热在这里有精品免费| 成人app网站| 91亚洲精品一区二区乱码| 成人网在线免费视频| 国产精品一区二区三区网站| 国产麻豆精品一区二区| 国产一区二区不卡| 高清在线不卡av| a级精品国产片在线观看| eeuss鲁一区二区三区| 91丨porny丨蝌蚪视频| 在线精品视频小说1| 欧美亚日韩国产aⅴ精品中极品| 精品视频一区二区不卡| 欧美情侣在线播放| 日韩亚洲欧美高清| 26uuu成人网一区二区三区| 国产日产欧美一区二区视频| 午夜电影一区二区三区| 亚洲欧美怡红院| 久久先锋资源网| 中文在线一区二区| 日韩理论片网站| 亚洲国产视频直播| 日本美女一区二区三区| 六月丁香婷婷久久| 国产成人一区在线| 97久久久精品综合88久久| 91福利视频久久久久| 7777精品伊人久久久大香线蕉完整版| 日韩一区二区三区视频在线观看| 久久一二三国产| 亚洲天堂网中文字| 三级欧美在线一区| 国模娜娜一区二区三区| av在线不卡免费看| 欧美日本一区二区| 亚洲精品在线观| 亚洲欧美二区三区| 日韩av网站免费在线| 国产一区二区伦理| 91啦中文在线观看| 91精品国产综合久久久久久久久久| 精品久久久久久久久久久久久久久久久 | 成人精品小蝌蚪| 色综合天天天天做夜夜夜夜做| 色婷婷国产精品久久包臀 | 精品久久一区二区三区| 国产精品久久久久久久久晋中| 一区二区三区在线播| 蜜臀精品一区二区三区在线观看| 国产麻豆日韩欧美久久| 色婷婷久久一区二区三区麻豆| 欧美一区二区三区成人| 国产精品色眯眯| 三级在线观看一区二区| 国产成人精品aa毛片| 欧美视频一区在线| 国产色综合久久| 亚洲成av人片在线观看| 国产乱国产乱300精品| 久久久精品2019中文字幕之3| 精品美女一区二区| 一区二区三区四区乱视频| 日本最新不卡在线| 91蜜桃传媒精品久久久一区二区| 欧美一区二区三级| 国产精品天天看| 亚洲乱码精品一二三四区日韩在线| 亚洲国产婷婷综合在线精品| 亚洲福利电影网| 国产成人欧美日韩在线电影| 欧美三级在线视频| 国产精品免费久久| 蜜臀91精品一区二区三区| 99精品偷自拍| 精品入口麻豆88视频| 又紧又大又爽精品一区二区| 麻豆一区二区99久久久久| 99热精品一区二区| 久久综合色综合88| 亚洲va在线va天堂| 成人短视频下载| 2020日本不卡一区二区视频| 图片区小说区区亚洲影院| 91香蕉国产在线观看软件| 久久久久久电影| 日韩成人dvd|