Microsoft MentorShip Project as Team StarLight
This Project is for Visualization of various PathFinding algorithms.
-
- Click on an empty grid node and drag the mouse pointer.
-
- Click on a wall element and drag the mouse pointer.
-
- Click on the Start/End-point element and drag the mouse pointer.
-
- click on a particular action to perform it.
-
- control center is on the left side of the screen and it can be opened by clicking on '>' and can be closed by clicking on '<'.
-
Keyboard shortcuts can be used for a particular ControlBar action as follows.
- SPACE - Play/Pause/Restart
- ⌫ BACKSPACE - Clear Path/Walls
- ← - Undo
- → - Redo/Step
- ↑ - Increase Undo/Redo steps
- ↓ - Increase Undo/Redo steps
- ⌥ - alt/option+↑ - Increase Step Delay when Playing
- ⌥ - alt/option+↓ - Increase Step Delay when Playing
-
- This is the folder structure of the project.
-
- This is the initialisation sequence of the PageScripts.single. '.single' classification is used for single EndPoint PageScript.
- page/index.html has
<script>PageScripts.single.init()</script>
-
- This is the controller state chart diagram. Different states/transitions can be triggered by Controller/ControlCenter/ControlBar actions. Either automatically or manually.
-
- This is the class diagram of the PageScripts Package/Bundle.
- In general the Controller maintains a grid and proxies the actions taken on DOM to grid.
- When In COMPUTING State, controller snoops on the operations of the algorithm and enqueues them in opQueue.
- When In PLAYING State, controller dequeues the operations from opQueue and shows them on screen through viewRenderer.
- The Controller controls a major part of the UI throught ViewRenderer.
- The MultiController and The MultiViewRenderer is for Multi EndPoints Page.
-
- This is the class diagram of the PathFinding Package/Bundle.
-
- This sequence shows how the controller Taps(Snoops) on the operations performed by an algorithm on a Graph-Node.
- Snoop Layer is just a bunch of getters/setters. Here.
-
- This is a action map for controlbar in each controller state.
- 'x' in a cell shows that that action will not be available in that controller state.
- '<>' around a word shows that the word is a controller state Machine transition from a state to another state.
- under '----' are the states from which the controller state Machine is going to pass through
- Toggle DarkMode is allowed in every state. It doesn't cause any state changes.
- Learnt new Graph Algorithms and implemented them.
- Implemented these Single EndPoint accommodating algorithms.
- Implemented these Multiple EndPoints accommodating algorithms.
- Learnt how to use StateMachine in code for controller.
- Learnt to use WebPack to pack a package bundle.
- Implemented undo/redo functionality using stack and deque.
- Learnt the Agent Sense-Process-Actuate approach
- We are Using this Approach by
- SENSING in grid using grid.getNeighbours().
- PROCESSING upon sensed data in Algorithm.
- ACTUATING by finding a path and following it. (showed on grid).
- We are Using this Approach by
- Learnt how to Tap(Snoop) on an attribute assignments to an object via getters and setters.
- Practiced Object Oriented Paradigm in JavaScript.
- Learnt Controller-ViewRenderer approach to softwares with UI.
- Readability
- We have used EsLint as a devDependency to follow a common coding style and maintain Redability.
- We have used camelCase variable names almost everywhere except some global constants.
- Working
- We have used babel Transpiler and PolyFill to target maximum amount of browsers possible.
- We have used Standard Jquery to actuate page related actions.
- Continuous Integration
- New UI with no 2D-WebGL just Jquery/HTML/CSS.
- new ControlBar to deliver functionalities easily.
- Provided Burst-Mode Undo/Redo with dynamic amount of steps, So that user can go through the steps manually.
- Provided functionality to choose delay dynamically(ControlCenter) to play at high/low speed and let user understand at desirable speed.
- Provided functionality to choose burst magnitude of undo/redo dynamically, So that user can go through steps at desirable burst undo/redo.
- Provided KeyBoard Shortcuts so that user can control the portal easily.
- Implemented These MultiEndPoint Algorithms.
- Added Show Cursor option so that user can visualise the flow of the operations.
- Added Dark Mode🔥.
-
Clone
$ git clone https://github.com/Wolverin-e/PathFinding.git
-
Install
# Install dependencies snapshot from package-lock.json $ npm ci # Install dependencies from package.json $ npm i
-
Start DevServer
- Read This for more info.
# webpack dev-server will be serving at # localhost:8000/PathFinding/page & localhost:8000/PathFinding/page/multi $ npm start
-
Lint Test
$ npm run lintTest
-
Lint
$ npm run lint
-
Build
- Read This for more info.
# This generates latest bundles using webpack in PathFinding/build directory $ npm run build