JavaScript 代寫、代寫JavaScript 編程作業、用JavaScript 做maze、JavaScript語言代寫

來源:互聯網
上載者:User

標籤:before   英語   points   not   ack   miss   ext   web編程   c++   

1 Instructions
In this assignment, you will be required to write JavaScript functions that simplify navigating an
elaborate maze.
1.1 Data File Specification
An example of properly formatted file is shown in Figure 1. The first file encodes a maze, the
second file encodes the directions inwhich to be moved.
1
part01test01.maze.emf
x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x , x
x , - , - ,x , - , - ,x , - ,x , - , - , - , - , - ,x , - , - , - ,x , - , - , - , - , - , - , - ,x , - , x
x , - , - , - , - ,x , - , - , - , - , - ,x ,x , - , - , - ,x , - , - , - , - , - , - , - ,x ,x , - , - , x
x , - ,x ,x , - , - ,x , - , - ,x , - , - , - ,x ,x ,x ,x ,x ,x , - ,x , - ,x , - , - ,x ,x , - , x
x , - ,x ,x ,x , - , - , - , - , - , - ,x , - ,x ,x ,x ,x ,x ,x , - ,x , - , - , - , - , - ,x , - , x
x , - , - , - , - , - , - ,x , - , - ,x , - , - , - , - , - , - , - , - , - ,x , - ,x ,x ,x , - , - , - , x
x ,x , - ,x ,x , - , - , - , - ,x , - ,x ,x , - ,x ,x , - , - ,x , - , - , - ,x ,x ,x ,x , - ,x , x
x , - , - , - , - , - ,x , - , - ,x , - , - , - , - , - ,x , - , - , - , - , - , - , - ,g ,x ,x , - , - , x
x , - ,x , - ,x , - , - , - , - ,x , - ,x ,x ,x , - , - , - , - , - , - ,x ,x ,x , - ,x ,x ,x , - , x
x , - , - , - , - , - ,x , - , - , - , - , - , - , - , - ,x , - ,x , - , - ,x , - , - , - , - , - ,x , - , x
x , - , - ,x , - , - , - , - ,x , - ,x , - , - ,x , - , - , - , - , - ,x , - , - , - ,x ,x , - , - , - , x
x , - , - ,x , - ,x , - , - , - , - , - , - , - , - , - , - , - ,x , - , - ,x ,x , - , - , - , - , - ,x , x
x , - , - , - , - , - , - ,x , - , - , - , - ,x , - , - ,x , - , - , - , - , - ,x ,x ,x , - ,x , - , - , x
x ,x ,x , - ,x , - , - ,x , - ,x , - , - , - ,x , - ,x ,x , - , - ,x ,x , - ,x , - , - , - , - , - , x
x , - , - , - , - , - , - , - , - , - , - ,x , - , - , - , - ,x , - , - , - ,x , - , - , - ,x , - , - ,x , x
x , - , - , - , - ,1 , - , - ,x , - , - , - ,x ,x , - ,x , - , - ,x , - , - ,x ,x , - ,x , - , - , - , x
x ,x , - , - ,x , - ,x , - , - , - ,x , - , - , - , - , - , - , - ,x ,x , - ,x ,x , - , - , - , - , - , x
x , - , - , - , - , - , - ,x , - ,x ,x , - , - ,x ,x , - ,x , - ,x , - , - ,x , - , - ,x , - ,x ,x , x
x ,x , - ,x , - , - , - ,x , - , - , - , - , - , - , - , - , - , - , - , - ,x , - , - , - , - , - ,x ,x , x
x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x , x
part01test01.moves.emf
l ,r ,l ,d ,r ,r ,l , u
Figure 1: A properly formatted encoding
2 One Player, One Move
The first part (onePlayerOneMove in the file csce322homeWork02part01.js) will take in one (1)
argument (a maze) and return a function that takes in one (1) argument (a move), and returns the
maze that is the result of moving Player 1 in the given direction.
The rules for moving are
? If a player is immediately blocked by a wall (x) or another player, they do not move
? A player continues to move in a given direction as long as “forward” and “backward” are
their only options to move in
“forward” is in the direction of travel and “backward” is opposite the direction of travel
? If a player encounters an obstacle (a wall or another player) while moving, they will attempt
to change their direction (with priority given to up, down, left, and right in that order), but
will not reverse their direction.
? A player will stop moving once they reach the goal (g), a dead-end where their only option
is to reverse their direction, or when they reach a location where they have more options for
travel than just “forward” and “backward”.
Page 2
x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x , x
x , - , - ,x , - , - ,x , - ,x , - , - , - , - , - ,x , - , - , - ,x , - , - , - , - , - , - , - ,x , - , x
x , - , - , - , - ,x , - , - , - , - , - ,x ,x , - , - , - ,x , - , - , - , - , - , - , - ,x ,x , - , - , x
x , - ,x ,x , - , - ,x , - , - ,x , - , - , - ,x ,x ,x ,x ,x ,x , - ,x , - ,x , - , - ,x ,x , - , x
x , - ,x ,x ,x , - , - , - , - , - , - ,x , - ,x ,x ,x ,x ,x ,x , - ,x , - , - , - , - , - ,x , - , x
x , - , - , - , - , - , - ,x , - , - ,x , - , - , - , - , - , - , - , - , - ,x , - ,x ,x ,x , - , - , - , x
x ,x , - ,x ,x , - , - , - , - ,x , - ,x ,x , - ,x ,x , - , - ,x , - , - , - ,x ,x ,x ,x , - ,x , x
x , - , - , - , - , - ,x , - , - ,x , - , - , - , - , - ,x , - , - , - , - , - , - , - ,g ,x ,x , - , - , x
x , - ,x , - ,x , - , - , - , - ,x , - ,x ,x ,x , - , - , - , - , - , - ,x ,x ,x , - ,x ,x ,x , - , x
x , - , - , - , - , - ,x , - , - , - , - , - , - , - , - ,x , - ,x , - , - ,x , - , - , - , - , - ,x , - , x
x , - , - ,x , - , - , - , - ,x , - ,x , - , - ,x , - , - , - , - , - ,x , - , - , - ,x ,x , - , - , - , x
x , - , - ,x , - ,x , - , - , - , - , - , - , - , - , - , - , - ,x , - , - ,x ,x , - , - , - , - , - ,x , x
x , - , - , - , - , - , - ,x , - , - , - , - ,x , - , - ,x , - , - , - , - , - ,x ,x ,x , - ,x , - , - , x
x ,x ,x , - ,x , - , - ,x , - ,x , - , - , - ,x , - ,x ,x , - , - ,x ,x , - ,x , - , - , - , - , - , x
x , - , - , - , - , - , - , - , - , - , - ,x , - , - , - , - ,x , - , - , - ,x , - , - , - ,x , - , - ,x , x
x , - , - , - , - ,1 , - , - ,x , - , - , - ,x ,x , - ,x , - , - ,x , - , - ,x ,x , - ,x , - , - , - , x
x ,x , - , - ,x , - ,x , - , - , - ,x , - , - , - , - , - , - , - ,x ,x , - ,x ,x , - , - , - , - , - , x
x , - , - , - , - , - , - ,x , - ,x ,x , - , - ,x ,x , - ,x , - ,x , - , - ,x , - , - ,x , - ,x ,x , x
x ,x , - ,x , - , - , - ,x , - , - , - , - , - , - , - , - , - , - , - , - ,x , - , - , - , - , - ,x ,x , x
x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x , x
l ,r ,l ,d ,r ,r ,l , u
Figure 2: Before onePlayerOneMove
Page 3
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
x - -x - -x -x - - - - -x - - -x - - - - - - -x - x
x - - - -x - - - - - xx - - -x - - - - - - - xx - - x
x - xx - -x - -x - - - xxxxxx -x -x - - xx - x
x - xxx - - - - - -x - xxxxxx -x - - - - -x - x
x - - - - - -x - -x - - - - - - - - -x - xxx - - - x
xx - xx - - - -x - xx - xx - -x - - - xxxx - xx
x - - - - -x - -x - - - - -x - - - - - - - gxx - - x
x -x -x - - - -x - xxx - - - - - - xxx - xxx - x
x - - - - -x - - - - - - - -x -x - -x - - - - -x - x
x - -x - - - -x -x - -x - - - - -x - - - xx - - - x
x - -x -x - - - - - - - - - - -x - - xx - - - - - xx
x - - - - - -x - - - -x - -x - - - - - xxx -x - - x
xxx -x - -x -x - - -x - xx - - xx -x - - - - - x
x - - - - - - - - - -x - - - -x - - -x - - -x - - xx
x - - -1 - - -x - - - xx -x - -x - - xx -x - - - x
xx - -x -x - - -x - - - - - - - xx - xx - - - - - x
x - - - - - -x - xx - - xx -x -x - -x - -x - xxx
xx -x - - -x - - - - - - - - - - - -x - - - - - xxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Figure 3: After onePlayerOneMove
3 One Player, Many Moves
The second part (onePlayerManyMoves in the file csce322homeWork02part02.js) will take in one
(1) argument (a maze) and return a function that takes in one (1) argument (an array of moves),
and returns the maze that is the result of Player 1 making all of the moves. If the maze is solved
before the list of moves is completely processed, the resulting maze is returned.
Page 4
x ,x ,x ,x ,x ,x ,x ,x ,x ,x , x
x , - ,x , - , - , - , - , - ,x , - , x
x , - , - , - , - ,x , - , - ,x , - , x
x , - , - , - , - , - , - , - , - , - , x
x ,x ,x , - , - ,x , - ,x ,x , - , x
x , - , - , - , - , - ,x , - , - , - , x
x ,x , - , - , - , - , - ,x , - , - , x
x , - ,x , - ,x , - , - ,g , - , - , x
x , - ,x , - , - , - ,x ,x , - ,x , x
x , - , - , - ,x , - , - ,x , - , - , x
x , - ,x , - ,x ,x , - ,x ,x , - , x
x , - ,x ,x , - , - , - , - , - , - , x
x , - , - , - , - , - ,x , - ,x , - , x
x , - ,x , - ,x , - , - , - , - ,x , x
x , - , - , - ,x , - , - ,x , - ,x , x
x , - , - ,x ,x ,x , - ,x , - , - , x
x , - , - , - , - , - , - , - ,1 , - , x
x , - , - ,x , - , - , - ,x , - , - , x
x , - , - , - , - ,x , - , - , - ,x , x
x , - ,x ,x , - , - ,x , - , - , - , x
x , - , - , - , - , - ,x , - , - , - , x
x ,x ,x ,x ,x ,x ,x ,x ,x ,x , x
r ,d ,d ,l ,u ,l ,r ,l ,r ,r ,r ,u , r
Figure 4: Before onePlayerManyMoves
Page 5
xxxxxxxxxxx
x -x - - - - -x - x
x - - - -x - -x - x
x - - - - - - - - - x
xxx - -x - xx - x
x - - - - -x - - - x
xx - - - - -x - - x
x -x -x - -g - - x
x -x - - - xx - xx
x - - -x - -x - - x
x -x - xx - xx - x
x - xx - - - - - - x
x - - - - -x -x - x
x -x -x - - - - xx
x - - -x - -x - xx
x - - xxx -x - - x
x - - - - - - -1 - x
x - -x - - -x - - x
x - - - -x - - - xx
x - xx - -x - - - x
x - - - - -x - - - x
xxxxxxxxxxx
Figure 5: After onePlayerManyMoves
4 Many Players , One Move
The third part (manyPlayersOneMove in the file csce322homeWork02part03.js) will take in one
(1) argument (a maze) and return a function that takes in one (1) argument (a move), and returns
the maze that is the result of Player 1 making that move. This differs from the first part in that
there will be more than one (1) player in the maze.
Page 6
x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x , x
x ,x ,x ,x , - , - , - , - , - , - ,x , - , - , x
x , - ,x , - , - , - ,x ,1 ,x , - ,x , - , - , x
x , - , - , - ,x , - , - , - , - , - , - ,x , - , x
x , - , - , - , - ,x , - , - ,x , - , - , - , - , x
x , - ,x ,x ,x , - , - , - , - , - , - , - , - , x
x ,x , - ,x , - , - , - ,x ,x , - ,x , - , - , x
x ,x , - , - ,x ,x , - ,x ,x , - , - , - ,x , x
x , - , - , - , - , - , - ,x ,x ,x ,x , - ,3 , x
x , - ,x ,x , - ,x ,x ,x ,x ,x ,x ,x , - , x
x ,x , - ,x , - , - ,x ,x ,x , - , - , - , - , x
x , - , - , - ,x , - ,x ,x ,x , - ,x , - , - , x
x , - ,x , - , - , - , - ,x ,x , - ,x ,x , - , x
x , - , - , - ,x ,x , - ,x ,x , - , - , - , - , x
x , - , - ,x ,x , - , - ,x ,x , - ,x , - , - , x
x ,x , - , - , - , - , - , - ,x ,2 , - , - , - , x
x ,x ,x ,x , - , - ,x , - ,x ,x ,x ,x , - , x
x , - , - , - , - , - , - , - ,x ,x ,x ,x , - , x
x , - , - ,x , - ,x , - ,x ,x ,x ,x ,x , - , x
x ,x , - , - , - , - , - , - , - , - ,x , - , - , x
x , - , - ,x , - ,x , - , - ,x , - , - , - ,x , x
x ,x , - , - , - , - , - ,x , - , - ,x , - , - , x
x ,x ,x , - , - , - ,x ,x , - , - , - , - , - , x
x , - , - ,x , - , - , - , - ,x , - ,x ,x , - , x
x , - ,x ,x , - , - , - , - , - , - , - ,x , - , x
x , - , - , - , - ,x , - ,x , - ,x , - , - , - , x
x , - , - , - , - , - , - ,x , - , - , - , - ,x , x
x , - , - ,x , - , - , - , - , - ,g , - , - ,x , x
x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x , x
d ,d ,r ,d ,d ,r ,l ,r ,u ,d ,d ,d ,r ,l , r
Figure 6: Before manyPlayersOneMove
Page 7
xxxxxxxxxxxxxx
xxxx - - - - - -x - - x
x -x - - -x -x -x - - x
x - - -x - -1 - - -x - x
x - - - -x - -x - - - - x
x - xxx - - - - - - - - x
xx -x - - - xx -x - - x
xx - - xx - xx - - - xx
x - - - - - - xxxx -3 x
x - xx - xxxxxxx - x
xx -x - - xxx - - - - x
x - - -x - xxx -x - - x
x -x - - - - xx - xx - x
x - - - xx - xx - - - - x
x - - xx - - xx -x - - x
xx - - - - - - x2 - - - x
xxxx - -x - xxxx - x
x - - - - - - - xxxx - x
x - -x -x - xxxxx - x
xx - - - - - - - -x - - x
x - -x -x - -x - - - xx
xx - - - - -x - -x - - x
xxx - - - xx - - - - - x
x - -x - - - -x - xx - x
x - xx - - - - - - -x - x
x - - - -x -x -x - - - x
x - - - - - -x - - - - xx
x - -x - - - - -g - - xx
xxxxxxxxxxxxxx
Figure 7: After manyPlayersOneMove
5 Many Players , Many Moves
The fourth part (manyPlayersManyMoves in the file csce322homeWork02part04.js) will take in
one (1) argument (a maze) and return a function that takes in one (1) argument (a list of moves),
and returns the maze that is the result of each player making the next move in the list in turn
(starting with Player 1). If the maze has already been solved, the maze is returned in that state.
Page 8
x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x , x
x , - , - , - , - , - , - , - , - ,2 , - , x
x , - ,x ,x ,x , - ,x , - , - ,x , - , x
x , - ,x , - , - , - , - , - ,x ,x , - , x
x , - , - , - ,x , - , - , - ,x , - , - , x
x , - ,x , - , - , - ,x , - , - , - , - , x
x ,x , - ,x ,x , - , - , - ,x ,x , - , x
x , - , - , - , - , - ,x ,x ,g , - , - , x
x , - ,x ,x ,x ,x ,x ,x , - ,x , - , x
x , - , - ,x ,x , - , - , - , - , - , - , x
x ,x , - , - , - , - ,x , - , - , - ,1 , x
x ,x ,x ,x ,x ,x ,x ,x ,x ,x ,x , x
u ,d ,d ,l ,r ,l ,d ,r ,d ,l , l
Figure 8: Before manyPlayersManyMoves
xxxxxxxxxxxx
x - - - - - -2 - - - x
x - xxx -x - -x - x
x -x - - - - - xx - x
x - - -x - - -x - - x
x -x - - -x - - - - x
xx - xx - - - xx - x
x - - - - - xxg - - x
x - xxxxxx -x - x
x - - xx - - - - - - x
xx - - - -x -1 - - x
xxxxxxxxxxxx
Figure 9: After manyPlayersManyMoves
6 Naming Conventions
Your files should follow the naming convention of
csce322homeWork02part01.js, csce322homeWork02part02.js, csce322homeWork02part03.js,
and csce322homeWork02part04.js.
6.1 helpers.js
A file named helpers.js has been provided with the functionality to read the .emf files into
matrices. If a modified helpers.js file is not included with your submission, the default will be
used in its place.
Page 9
7 webgrader Note
Submissions will be tested with node.js, note the browser. cse.unl.edu is currently running
version 4.8.4 of node.
8 Point Allocation
Component Points
csce322homeWork02part01.js
Test Cases 1 × 20
Total 20
csce322homeWork02part02.js
Test Cases 1 × 20
Total 20
csce322homeWork02part03.js
Test Cases 1 × 30
Total 30
csce322homeWork02part04.js
Test Cases 1 × 30
Total 30
Total 100
9 External Resources
JavaScript Tutorial
http://www.daixie0.com/contents/14/1250.html

本團隊核心人員組成主要包括矽谷工程師、BAT一線工程師,國內Top5碩士、博士生,精通德英語!我們主要業務範圍是代做編程大作業、課程設計等等。

 

我們的方向領域:window編程 數值演算法 AI人工智慧 金融統計 計量分析 大資料 網路編程 WEB編程 通訊編程 遊戲編程多媒體linux 外掛編程 程式API影像處理 嵌入式/單片機 資料庫編程 控制台 進程與線程 網路安全  組合語言 硬體編程 軟體設計 工程標準規等。其中代寫代做程式設計語言或工具包括但不限於以下範圍:

C/C++/C#代寫

Java代寫

IT代寫

Python代寫

輔導編程作業

Matlab代寫

Haskell代寫

Processing代寫

Linux環境搭建

Rust代寫

Data Structure Assginment 資料結構代寫

MIPS代寫

Machine Learning 作業 代寫

Oracle/SQL/PostgreSQL/Pig 資料庫代寫/代做/輔導

Web開發、網站開發、網站作業

ASP.NET網站開發

Finance Insurace Statistics統計、迴歸、迭代

Prolog代寫

Computer Computational method代做

 

因為專業,所以值得信賴。如有需要,請加QQ:99515681 或郵箱:[email protected]

:codinghelp

JavaScript 代寫、代寫JavaScript 編程作業、用JavaScript 做maze、JavaScript語言代寫

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.