[SOLVED] 代写 game Java javascript Assignment 02 (Due: Friday, October 18, 2019, 11 : 59 : 00PM) CSCE 322

30 $

File Name: 代写_game_Java_javascript_Assignment_02_(Due:_Friday,_October_18,_2019,_11_:_59_:_00PM)_CSCE_322.zip
File Size: 923.16 KB

SKU: 5354093074 Category: Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Or Upload Your Assignment Here:


Assignment 02 (Due: Friday, October 18, 2019, 11 : 59 : 00PM) CSCE 322
THIS ASSIGNMENT IS ONLY WORTH 10% OF YOUR FINAL GRADE. 1 Instructions
In this assignment, you will be required to write JavaScript functions that simplify playing of the variation of Slippery Crossings.
1.1 Data File Specification
An example of properly formatted file is shown in Figure 1. The first file encodes a list of moves. The second file encodes the maze.
1

r,l,u,l,d,d,d,d,d,r,u,d,u
part01test01.moves.scm
part01test01.maze.scm
x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x x,-,-,x,-,-,-,x,x,-,-,-,-,-,-,x x,-,x,-,-,-,x,-,-,-,-,x,-,x,x,x x,-,x,x,x,-,x,-,x,x,-,-,-,-,-,x x,-,-,-,-,-,-,-,-,-,-,-,-,x,-,x x,-,-,-,x,x,-,-,-,-,-,-,-,x,-,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,-,-,-,1,-,-,x x,-,-,-,-,-,-,-,-,-,-,-,x,-,-,x x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x
Figure 1: A properly formatted game encoding
2 One Player, One Slide
The first part (onePlayerOneSlide in the file csce322a02part01.js) will take in one (1) argument (a maze) and return a function that takes in one argument (a direction for a slide), and returns the maze that is the result of making the slide in the initial maze. If the slide goes nowhere, the state of the maze is unchanged.
Page 2

r,l,u,l,d,d,d,d,d,r,u,d,u
x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x x,-,-,x,-,-,-,x,x,-,-,-,-,-,-,x x,-,x,-,-,-,x,-,-,-,-,x,-,x,x,x x,-,x,x,x,-,x,-,x,x,-,-,-,-,-,x x,-,-,-,-,-,-,-,-,-,-,-,-,x,-,x x,-,-,-,x,x,-,-,-,-,-,-,-,x,-,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,-,-,-,1,-,-,x x,-,-,-,-,-,-,-,-,-,-,-,x,-,-,x x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x
Figure 2: Input
Page 3

xxxxxxxxxxxxxxxx x–x—xx——x x-x—x—-x-xxx x-xxx-x-xx—–x x————x-x x—xx——-x-x x—–x–x-x–xx x–xx–xx–x—x x-x–x-xx—x–x x–x-x–gx—–x x–x—–x—–x xxx——x–xxxx x————–x x——–x—–x xx——-x—-xx x-x—–x–xx-xx x——-x-x—-x x-xx—-x—x–x x—-x———x xx–x–xx—–1x x———–x–x xxxxxxxxxxxxxxxx
Figure 3: Solution
3 One Player, Many Slides
The second part (onePlayerManySlides in the file csce322a02part02.js) will take in one (1) argument (a maze) and return a function that takes in one argument (an array of directions for slides), and returns the maze that is the result of making the slides in the initial maze. If the goal is reached before the slides are exhausted, the solved maze is returned (with the player in the location of the goal).
Page 4

d,u,u,r,u,d,u,d,r,l,l,u,d,u
x,x,x,x,x,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,-,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,-,x,-,-,x,x,x,-,x,x x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x
xxxxxxxxxxxxxxxxxxx xxx–x—xx—x–xx x1—-x—-xx—–x x–x—-xxx——-x x—–x———–x x—x—x-x-g-x-x-x x———–x—–x xx-x–x—-xx—–x xx-x–x-x——-x-x x–x-x–xxx-xx—xx x——-x–x-xxxxxx x-x–x-xx——–xx x-xx–x—xx-x—xx x——-x-x–xx—x x-xxx—–x—-x–x x——xx-x–xxx-xx xxxxxxxxxxxxxxxxxxx
Figure 4: Input
Figure 5: Solution
4 Many Players, One Slide
The third part (manyPlayersOneSlide in the file csce322a02part03.js) will take in one (1) argument (a maze) and return a function that takes in one argument (an array of directions for
Page 5

slides), and returns the maze that is the result of making the slides in the initial maze. The first player will make the first slide, the second player will make the second slide, etc. (until every player has made a single slide). If the goal is reached before each player has a chance to make a slide, the solved maze is returned (with the winning player in the location of the goal). A player who is slid into will act as a wall (stopping the sliding player from progressing).
l,u,u,l,u,l,r,l,d,r,l,r,d,l
x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,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,-,3,-,-,x,2,-,-,-,-,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,x,x,x,x,x,x
xxxxxxxxxxxxxxxxxxxxx x–xx–xx-xx-x–x–xx x–3x–2–xx-xx—–x x1——x–x–x-x-x-x xx–x—–x———x xx—-x—–x-x-xgxxx x——–x–x—–x-x xxx ——-xxx –x—-x x————–xxx–x x—-x–x———-xx x-x—xx–x—x–x–x x–xx-x-xx—-x—-xx x-x—–xx——–xxx x–x-x-x———–xx xxxxxxxxxxxxxxxxxxxxx
Figure 6: Input
Figure 7: Solution
Page 6

5 Many Players, Many Slides
The fourth part (manyPlayersManySlides in the file csce322a02part04.js) will take in one (1) argument (a maze) and return a function that takes in one argument (an array of directions for slides), and returns the maze that is the result of making the slides in the initial maze. The first player will make the first slide, the second player will make the second slide, etc. If the goal is reached before the slides are exhausted, the solved maze is returned (with the winning player in the location of the goal). A player who is slid into will act as a wall (stopping the sliding player from progressing).
l,d,l,d,r,u,l,d,d,d,r,l,d
x,x,x,x,x,x,x,x,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,-,-,-,-,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
Figure 8: Input
Page 7

xxxxxxxxxxxxxxxxxx x–x—–x-xx—xx x-xx——-x-x—x x1–x——x—–x x—–x-x—–xx-x x-x–x–xx–x-x–x x————-x–x xx-x—x—xx–xxx x—x—x——xxx x–x–x———-x x-x—xxx—x—-x x-x——-x–x—x xx-xx—x–x—–x x—-x—x—-xx-x x–xxxx —-x—–x x——–x-xx–xxx x-x–x——xxxg -x xx——xxx—-x-x x–x-x-x—-xx—x x-x—-x-x–x—-x x–x———x—x xxxxxxxxxxxxxxxxxx
6 Naming Conventions
Figure 9: Solution
Your files should follow the naming convention of
csce322a02part01.js, csce322a02part02.js and csce322a02part03.js.
6.1 helpers.js
A file named helpers.js has been provided with the functionality to read the .m files into numerical matrices. If a modified helpers.js file is not included with your submission, the default will be used in its place.
7 webgrader Note
Submissions will be tested with node.js, not the browser. cse.unl.edu is currently running version 8.15.1 of node.
8 Point Allocation
9 External Resources
JavaScript Tutorial
Page 8

Component
Points
csce322a02part01.js
csce322a02part02.js
csce322a02part03.js
csce322a02part04.js
20% 20% 30% 30%
Total
100%
Page 9

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] 代写 game Java javascript Assignment 02 (Due: Friday, October 18, 2019, 11 : 59 : 00PM) CSCE 322
30 $