Collect all the collectibles on the game board using the minimum number of steps
Collectible points:
Controls
- Original Mario music and sound effects for them retro-feel
- Mario responds to the direction of motion
- Moves count and Points are always displayed on HUD
- Modern CSS3 Flexbox and Grid for unrestricted board blocks
- Prefetch of game sprites and assets
- Lazy-loaded modules
- Best practices for the app has been followed (eg: Interfaces for DOs, JSON for defining the game's
collectibles
)
For this project, the code has been written for more dynamicity & code readability than for performance
E.g:
[1]
this.gameSprites.findIndex(e => e.type === 'collectibles')
Use of find/filter instead of using fixed indexes / constants
[2]
An Object is used as the primary data structure.
A 2D array would perform much better for grid data
This project was generated with Angular CLI version 10.1
Clone the repo and run npm i
to install dependencies
Then run ng serve -o
for a dev server.
The app will run at http://localhost:4200/
.
It will automatically reload if you change any of the source files.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for the optimized production build config.
Run ng test
to execute the unit tests via Karma.