国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

COMP284 代做、Java 語言編程代寫

時間:2024-04-21  來源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯



 Assignment 2: JavaScript
 1/6
Assignment 2: JavaScript

100 Points Possible
2024/1/22 to 2024/6/30
Add comment
Details
COMP284 Scripting Languages (202**4) --
Assignment 2: JavaScript
Your task for this assignment consists of two parts:
1. Develop a JavaScript program that provides the functi onality stated in the Requirements
secti on (htt ps://canvas.liverpool.ac.uk/courses/**095/assignments/265339) below.
2. Make the JavaScript program that you have created accessible and usable via the URL
https://student.csc.liv.ac.uk/~<your user name>/game.html
taking care of the requirements set out in Submission and Setup secti on
(htt ps://canvas.liverpool.ac.uk/courses/**095/assignments/265339) below.
Requirements
The JavaScript program implements a simple game that consists of three stages, setup, play and end.
During the play stage the game proceeds in rounds. The game is played on a grid with 10 x 10 cells.
It involves a spaceship that is controlled by the user, a couple of roboti c spaceships that are
controlled by the computer (that is, your program), asteroids, and (initi ally inacti ve) mines. The user
and your program are the two players of the game. All spaceships can move around on the grid and
the roboti c spaceships hunt the user's spaceship; the user's spaceship tries to avoid getti ng caught
while trying to acti vate all the mines on the grid, possibly destroying some or all the roboti c
spaceships in the process.
The game always starts in the setup stage. During that stage the user is shown the grid and can
place four different types of objects on the cells of the grid:
by clicking on a cell and typing the lett er "a", an asteroid is placed on a cell;
by clicking on a cell and typing the lett er "m", a mine is placed on a cell;
by clicking on a cell and typing the lett er "r", a roboti c spaceship is placed on a cell;
by clicking on a cell and typing the lett er "u", the user's spaceship is placed on a cell.
There is no limit on the number of asteroids, mines, and roboti c spaceships, but there is obviously
only one user's spaceship. No grid cell can initi ally contain more than one object. If the user types a
character that is not among "a", "m", "r" and "u", an error message should be shown.
 Assignment 2: JavaScript
 2/6
In additi on to the grid, there must be a butt on that allows the user to end the setup stage of the
game. If the user tries to end the setup stage of the game without placing the user's spaceship, then
an error message should be shown and the user remains in the setup stage. Otherwise the game
conti nues with the play stage.
At the start and during the play stage, the user is again shown the grid, initi ally with all the objects
that have been placed on the grid during the setup stage, plus additi onal status informati on: The
number of the round currently played, the number of inacti ve mines on the grid, and the number of
roboti c spaceships on the grid. In additi on, there must be butt on that allows the user to end
the play stage at any ti me.
While in the play stage, the game proceeds in rounds, each round starts with the user's turn
followed by the computer's turn. At the start of a round, the number of the round currently played is
increased by one (the first round has the number 1), and the status informati on shown to the user is
updated.
During his/her turn, the user can att empt to move his/her spaceship horizontally or verti cally on the
grid by typing one of four lett ers:
"a" att empts to move the user's spaceship one grid cell to the left ,
"d" att empts to move the user's spaceship one grid cell to the right,
"w" att empts to move the user's spaceship one grid cell up,
"s" att empts to move the user's spaceship one grid cell down.
If the user types any other character, then an error message should be shown, the user's turn does
not end, and the user has the possibility to type another character. If the att empted move would
result in the user's spaceship ending up outside the grid or on a cell occupied by an asteroid, then
the att empt to move fails, the user's spaceship does not move, an error message should be shown,
the user's turn does not end, and the user has the possibility to type another character. Otherwise,
the att empted move is successful and the user's spaceship changes cells:
If the cell to which the spaceship has moved was previously empty, then nothing special happens
and the user's turn is over.
If the user's spaceship ends up on a grid cell that contains an inacti ve mine, then the mine
is acti vated, the number of inacti ve mines shown in the status informati on is reduced by one. The
mine remains acti vated (and in place) for the remainder of the game. If a roboti c spaceship is on a
cell surrounding an acti vated mine, it is immediately destroyed and the number of roboti c
spaceships shown in the status informati on is changed accordingly. The user's turn is then over.
If the user's spaceship ends up on a grid cell that contains an acti vated mine, then nothing
special happens. The user's spaceship and the mine simply coexist on the cell. The user's turn is
over.
If the user's spaceship ends up on a grid cell that contains a roboti c spaceship, then the user's
spaceship is destroyed, and the game proceeds to the end stage.
During the computer's turn your program att empts to move each of the roboti c spaceships in an
order that allows each to move if at all possible. Unlike the user's spaceship, the roboti c spaceships
 Assignment 2: JavaScript
 3/6
are not only able to move horizontally and verti cally but also diagonally. Just like the user's
spaceship, each roboti c spaceship only moves at most one cell in a turn.
If the user's spaceship is on a grid cell immediately surrounding a roboti c spaceship, then that
roboti c spaceship must move to the cell occupied by the user's spaceship. If the user's spaceship
is on a cell surrounding an acti vated mine, then both the roboti c spaceship and the user's
spaceship are destroyed. Otherwise only the user's spaceship is destroyed. The status
informati on is updated accordingly and the game proceeds to the end stage.
If the user's spaceship is not on a grid cell immediately surrounding a roboti c spaceship, but one
or more of those grid cells contains an inacti ve mine, then the roboti c spaceship must move to
one of those mines, the mine is removed from the grid, the number of inacti ve mines shown in
the status informati on is reduced by one.
If none of the surrounding grid cells contains the user's spaceship nor an inacti ve mine, then a
roboti c spaceship can move to an arbitrary surrounding cell provided that this move does not
take it to a grid cell that is outside the grid or occupied by an asteroid or by another roboti c
spaceship.
If a roboti c spaceship were to move onto a cell surrounding an acti vated mine, then the roboti c
spaceship is destroyed and the number of roboti c spaceships shown in the status informati on is
reduced by one.
A roboti c spaceship is not allowed to stand sti ll if it can move. However, if a roboti c spaceship
cannot move at all, then the computer should simply proceed to the next roboti c spaceship.
Once an att empt has been made to move each of the roboti c spaceships, the computer's turn and
the current round ends, and the status informati on is updated.
The play stage ends if one of the following conditi ons becomes true:
the user ends the play stage (by pressing the butt on provided for that);
the user's spaceship is destroyed;
at the end of a turn there are no roboti c spaceships left on the grid;
at the end of a turn there are no inacti ve mines left on the grid;
neither the user's spaceship nor any of the roboti c spaceships is able to move.
Once the play stage has ended, the game is in the end stage. In the end stage the program
determines the outcome of the game. The outcome is a win for the user if there are no roboti c
spaceships left on the grid but the user's spaceship has survived; the outcome is a win for the
computer if the user's spaceship has been destroyed and at least one roboti c spaceship has
survived; otherwise, the outcome is a draw. The program should display a message indicati ng the
outcome of the game and then stop. During the end stage the program should not react to any user
input or acti ons.
Additi onal Requirements and Comments:
The bulk of your JavaScript code should be in a JavaScript library called game.js . Before
submitti ng your soluti on, you should create a copy of game.js named game.pretty.js in a
directory other than your public_html directory, say, your home directory. Then make the file
game.js indecipherable for humans using the command
 Assignment 2: JavaScript
 4/6
uglifyjs-3 $HOME/game.pretty.js --mangle --compress > $HOME/public_html/game.js
Make sure that aft er performing this operati on your game sti ll works. Also make sure that
game.pretty.js can only be read by yourself and is not in your public_html directory.
It is possible that during the setup stage the user does not place any mines on the grid. On
entering the play stage your program should recognise that, immediately proceed to
the end stage, and declare the outcome of the game.
It is also possible that during the setup stage the user does not place any roboti c spaceships on
the grid. On entering the play stage your program should recognise that, immediately proceed to
the end stage, and declare the outcome of the game.
It should be possible for the user to see whether a mine is inacti ve or has been acti vated.
Whether the cells surrounding an acti vated mine are visually disti nct is up to you.
You should carefully analyse in which situati ons the user's spaceship and the roboti c spaceships
might not be able to move in order to correctly end the play stage in such situati ons.
Ideally your program would move the roboti c spaceships in such a way that they increase their
chances of destroying the user's spaceship. This could be done by each roboti c spaceship trying
to decrease the distance to the user's spaceship with each move. But you could also implement a
strategy by which the roboti c killer spaceships try to `encircle' the user's spaceship in order to
increase their chances. They could also `guard' one specific inacti ve mine, knowing that the user
must eventually try to acti vate it.
Also, be aware that the requirement that a roboti c spaceship must move if it can, means that it
might have to move onto a cell surrounding an acti vated mine and be destroyed. But if
alternati ve moves exist, then they should be preferred.
JavaScript engines differ from browser to browser. You should make sure that your system works
in all commonly used browsers (e.g., Google Chrome, Microsoft Edge, Mozilla Firefox) and on all
commonly used platf orms (e.g., Linux derivati ves and Microsoft Windows).
Your JavaScript program should only depend on your own code. The use of JavaScript
libraries/frameworks, like jQuery, is not be used.
Your code should follow the COMP284 Coding Standard
(htt ps://canvas.liverpool.ac.uk/courses/**095/files/10520245?wrap=1) . This includes pointi ng out
which parts of your code have been developed with the help of on-line sources or textbooks and
references for these sources. You must also provide references for any language constructs or
functi ons that you have used that were not covered in the lectures.
A program that deals sati sfactorily with these additi onal requirements and comments, in additi on to
providing the basic functi onality required, will receive higher marks.
Submission and Setup
Make game.html, game.js, and other files (but not game.prett y.js) accessible via the departmental
web server so that the game can be played via the URL given at the beginning of the assignment.
This playable version of the game must remain available, working, and unchanged from the ti me of
submission to the end of July 2024.
 Assignment 2: JavaScript
 5/6
Permissions of the files in your filestore must be such that no other user can view their contents in
the filestore. The permissions on your public_html directory must be such that any user can obtain a
listi ng of its content.
From the files on the departmental server, create a single zip-file named COMP284-2.zip containing
all relevant files (game.html, game.js, game.prett y.js, any CSS file, and local images, but no
directories) and submit it via the departmental submission system
at htt ps://sam.csc.liv.ac.uk/COMP/Submissions.pl?module=comp284
(htt ps://sam.csc.liv.ac.uk/COMP/Submissions.pl?module=comp284) (COMP284-2: JavaScript).
The files submitt ed must be identi cal to those set up on the departmental web server. Furthermore,
no alterati ons are allowed to the latt er aft er files have been submitt ed. If a submitt ed file and the
corresponding file on the departmental web server have different ti mestamps, then the later
ti
mestamp will be used to determine lateness. This applies even if the earlier file is used for marking.
Deadline
The deadline for this assignment is
Thursday, 25 April 2024, 17:00
Earlier submission is possible, but any submission aft er the deadline att racts the standard lateness
penalti es. Please remember that a strict interpretati on of `lateness' is applied by the Department,
that is, a submission a minute aft er the deadline is considered to be a day late. Also remember that
late resubmissions are not allowed.
Assessment
This assignment will address the following learning outcomes of the module:
Develop computer-based or client-side web-based applicati ons using an appropriate scripti ng
language.
This assignment will contribute 50% to the overall mark of COMP284. Failure on this assignment
may be compensated by higher marks on other assignments for this module.
Marks will be awarded according to the following scheme, assessing the extend to which the
applicati on you have developed by the deadline meets the requirements, has been set up correctly,
and submitt ed correctly:
Submission, Setup, Error-freeness: 10
Quality of the interface design: 10
Correctness and quality of the implementati on of the setup stage: 12
Correctness and quality of the implementati on of the play stage: 46
Correctness and quality of detecti ng the end of the game and of the end stage: 10
Code layout, Comments, References, Quality of code: 12
 Assignment 2: JavaScript
 6/6
In more detail, the requirements above translate into about ** criteria that your system must sati sfy.
Marks are given according to the extent to which the system is observed to behave in the expected
way and produces correct results, and, to a lesser extent, how well the code is writt en. Code that has
no observable effect will typically receive no marks.
As stated above, the University policy on late submissions applies to this assignment, as do the
University policy on coursework submission (available
at htt ps://www.liverpool.ac.uk/media/livacuk/tqsd/code-of-practi ce-on?assessment/appendix_Q_cop_assess.pdf (htt ps://www.liverpool.ac.uk/media/livacuk/tqsd/code-of?practi ce-on-assessment/appendix_Q_cop_assess.pdf) ) and the University policy on academic integrity
(available at htt p://www.liv.ac.uk/student-administrati on/student-administrati on-centre/policies?procedures/academic-integrity/ (htt p://www.liv.ac.uk/student-administrati on/student-administrati on?centre/policies-procedures/academic-integrity/) ). You should follow the COMP284 Lab Rules
(htt ps://cgi.csc.liv.ac.uk/~ullrich/COMP284/notes/COMP284LabRules.pdf) to ensure that you do not
breach the latt er policy.
Feedback
You can expect individual feedback for this assignment about three weeks aft er the deadline.
Generic feedback will be provided five days aft er the deadline. No work can be submitt ed more than
5 days aft er the deadline.

請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp

掃一掃在手機(jī)打開當(dāng)前頁
  • 上一篇:代做CS 7642 Reinforcement Learning and Decision
  • 下一篇:菲律賓免簽7天(中國人免簽入境辦法)
  • 無相關(guān)信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務(wù) 管路
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真技術(shù)服務(wù)
    流體CFD仿真分析_代做咨詢服務(wù)_Fluent 仿真
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強(qiáng)度疲勞振動
    結(jié)構(gòu)仿真分析服務(wù)_CAE代做咨詢外包_剛強(qiáng)度疲
    流體cfd仿真分析服務(wù) 7類仿真分析代做服務(wù)40個行業(yè)
    流體cfd仿真分析服務(wù) 7類仿真分析代做服務(wù)4
    超全面的拼多多電商運(yùn)營技巧,多多開團(tuán)助手,多多出評軟件徽y1698861
    超全面的拼多多電商運(yùn)營技巧,多多開團(tuán)助手
    CAE有限元仿真分析團(tuán)隊,2026仿真代做咨詢服務(wù)平臺
    CAE有限元仿真分析團(tuán)隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內(nèi)
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 寵物飼養(yǎng) 十大衛(wèi)浴品牌排行 suno 豆包網(wǎng)頁版入口 wps 目錄網(wǎng) 排行網(wǎng)

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
    ICP備06013414號-3 公安備 42010502001045

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    青青青在线视频播放| 久久久久久欧美| 亚洲av首页在线| 一区二区不卡在线视频 午夜欧美不卡'| 国产精品久久国产精品| 国产精品久久久久久久久久新婚| 国产精品日韩欧美| 国产精品国产三级国产专区51 | 精品不卡在线| 精品国产一区二区三区麻豆小说| 欧美猛少妇色xxxxx| 美女久久久久久久久久久| 久久久久成人网| 亚洲最新在线| 日韩欧美在线播放视频| 欧美一区观看| 国产日韩亚洲欧美在线| 成人免费毛片播放| 91成人免费视频| 日韩天堂在线视频| 久久av资源网站| 中文字幕一区二区三区在线乱码| 懂色一区二区三区av片| 日本精品在线视频| 免费一级特黄毛片| 99精品视频在线看| 久久久久久亚洲精品不卡4k岛国| 国产精品人成电影在线观看 | 国产日韩av高清| 国精产品一区一区三区有限在线| 欧洲视频一区二区三区| 国产在线拍偷自揄拍精品| 麻豆成人小视频| 黄色一区三区| 91免费福利视频| 色婷婷综合久久久久| 精品国产免费av| 欧美一级免费播放| 免费拍拍拍网站| 91免费人成网站在线观看18| 久久久精品日本| 中文字幕日韩精品久久| 日本韩国在线不卡| 国产欧美高清在线| 久久99久久精品国产| 麻豆国产精品va在线观看不卡| 亚洲永久在线观看| 欧美亚洲精品日韩| 777精品视频| 国产精品第157页| 日韩av高清在线播放| 免费国产在线精品一区二区三区| 国产精彩免费视频| 免费99精品国产自在在线| 欧美在线视频网站| av资源站久久亚洲| 国产精品国产三级国产aⅴ浪潮| 色综合久久久久久久久五月| 国产美女主播一区| 国产精品女人网站| 日本一区视频在线| 99久热re在线精品996热视频| 国产精品青青在线观看爽香蕉| 亚洲伊人成综合成人网| 精品日韩在线播放| 久久精品免费电影| 日韩欧美三级一区二区| 99在线精品免费视频| 久久中文字幕在线视频| 激情图片qvod| 久久99国产精品一区| 欧美一区二区三区免费视| 国产精品一区二区久久| 国产精品成人免费电影| 欧美日韩精品免费看| 国产精品com| 日韩一区国产在线观看| 国产伦精品一区二区三区视频黑人 | 欧美激情 国产精品| 91国在线高清视频| 伊人色综合久久天天五月婷| 国产美女搞久久| 国产精品久久久久不卡| 欧美在线性视频| 久久久精品电影| 欧美这里只有精品| 精品国产一区二区三区久久狼5月| 日韩免费精品视频| 日韩在线播放一区| 欧美极品色图| 国产精品欧美在线| 美女在线免费视频| 欧美亚洲日本网站| 久久精品在线播放| 黄色a级片免费| 插插插亚洲综合网| 国产乱码精品一区二区三区中文| 国产精品福利网站| 国产欧美在线播放| 一区二区视频在线免费| 91精品视频在线| 日韩不卡视频一区二区| 日韩在线免费视频| 欧美日韩国产精品一卡| 国产精品视频午夜| 国产日韩欧美视频在线| 一本久道中文无码字幕av| 99精品视频在线看| 天天好比中文综合网| 日韩一区二区欧美| 精品视频无码一区二区三区| 综合色婷婷一区二区亚洲欧美国产| 国产精品又粗又长| 亚洲国产欧洲综合997久久| 国产v综合v亚洲欧美久久| 加勒比成人在线| 一区二区三区四区久久| 国产黑人绿帽在线第一区| 欧美精品一区二区三区四区五区| 精品国产一二三四区| 久久在线中文字幕| 精品人妻大屁股白浆无码| 九九久久国产精品| 国产精品a久久久久久| 久久亚洲高清| 欧美日韩一区综合| 精品国产乱码久久久久久88av | 日韩人妻一区二区三区蜜桃视频| 久久色在线播放| 国产精品一码二码三码在线| 日本免费黄视频| 九九热r在线视频精品| 91精品视频观看| 欧美日韩国产一二| 亚洲欧洲国产精品久久| 国产精品日韩av| 久热这里只精品99re8久| 欧美v在线观看| 亚洲乱码日产精品bd在线观看| 国产成人精品午夜| av免费观看网| 狠狠色综合网站久久久久久久| 亚洲一区美女| 久久综合网hezyo| 国产高清一区二区三区| 国产午夜福利100集发布| 日韩av大全| 欧美成年人视频| 国产xxxx振车| 99视频免费播放| 国产亚洲欧美一区二区三区| 人妻av无码专区| 懂色av一区二区三区在线播放| 不卡av日日日| 久久精品亚洲热| 久久国产精品视频在线观看| 99在线观看| 国产欧美精品一区二区| 欧美久久综合性欧美| 日日摸日日碰夜夜爽av| 最新国产精品久久| 国产精品久久久久免费a∨大胸| 8050国产精品久久久久久| 国产欧美日韩网站| 黄色av网址在线播放| 欧洲成人在线观看| 日本最新高清不卡中文字幕| 亚洲一区二区三区视频播放| 久久99国产精品自在自在app| 国产精品久久久久久久小唯西川| 日韩中文字幕久久| 久久久久久久久久久久久久久久av| 91九色单男在线观看| 国产精品一区电影| 国产欧美精品va在线观看| 美媛馆国产精品一区二区| 免费在线观看一区二区| 日韩免费在线观看视频| 日本一区二区在线免费播放| 午夜精品一区二区三区在线视| 中文字幕无码不卡免费视频| 在线日韩av永久免费观看| 欧美日产国产成人免费图片| 久热精品在线视频| 欧美成人精品在线观看| 国产精品成av人在线视午夜片| 国产精品国产三级国产aⅴ浪潮| 国产精品久久久久久亚洲影视| 国产精品免费一区二区三区观看| 久久精品2019中文字幕| 久久久国产成人精品| 国产精品视频免费观看| 国产精品丝袜视频| 国产精品久久久久9999| 久久综合亚洲社区| 欧美激情xxxx| 亚洲精品久久久久久一区二区 | 日本一本a高清免费不卡| 日韩av在线第一页| 欧洲亚洲一区二区三区四区五区|