mirror of
https://github.com/vlang/v.git
synced 2025-09-14 06:52:36 +03:00
example: add a path finding algorithm visualizer using gg (#20060)
This commit is contained in:
parent
2dce525d90
commit
680b0d463a
4 changed files with 533 additions and 0 deletions
33
examples/gg/path_finding_algorithm_visualizer/README.md
Normal file
33
examples/gg/path_finding_algorithm_visualizer/README.md
Normal file
|
@ -0,0 +1,33 @@
|
|||
# A* path finding algorithm visualizer
|
||||
This is a simple visualizer for an A* path finding algorithm written in V.
|
||||
|
||||
# Quick start
|
||||
|
||||
```console
|
||||
# to run:
|
||||
$ v run aStar.v
|
||||
|
||||
# to just compile:
|
||||
$ v aStar.v
|
||||
|
||||
# then to run:
|
||||
$ ./aStar
|
||||
```
|
||||
|
||||
# Controls
|
||||
|
||||
- `q` : To quit the application
|
||||
- `c`: clear the grid and start from new one
|
||||
- `space`: initialize path finding algorithm
|
||||
|
||||
|
||||
# Demo
|
||||

|
||||
|
||||
# 🔴🔴🔴🔴 Area of improvments 🔴🔴🔴🔴🔴
|
||||
|
||||
- 🚧 Under Construction: We are using heap, but that is not correctly
|
||||
implemented, since instead of O(log(n)) it takes O(n). For that reason,
|
||||
having a bigger grid size, will break the application.
|
||||
|
||||
- 🌱 Growth Opportunity: make it responsive.
|
Loading…
Add table
Add a link
Reference in a new issue