added contributing to ReadMe
This commit is contained in:
parent
d151bfb71c
commit
3dc71499ac
1 changed files with 14 additions and 0 deletions
14
README.md
14
README.md
|
@ -13,3 +13,17 @@ WebAssembly version can be found here [beepsort.polsevev.dev](https://beepsort.p
|
||||||
- Clean up user interface, perhaps move to JS?
|
- Clean up user interface, perhaps move to JS?
|
||||||
- Add more visualization modes (circle, points etc)
|
- Add more visualization modes (circle, points etc)
|
||||||
- Add more algorithms
|
- Add more algorithms
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
If you wish to contribute an algorithm to this project, i encourage it!
|
||||||
|
|
||||||
|
Algorithms are located in [Algorithm.rs](./src/Algorithm.rs) and are made as follows!
|
||||||
|
|
||||||
|
1. Create a case in the match located in the function run
|
||||||
|
2. Implement the algorithm as an async function
|
||||||
|
3. Whenever you wish to swap two elements, do so in the following manner:
|
||||||
|
- ```if list.swap(a,b).await {return}```
|
||||||
|
- This ensures we can exit the run of the algorithm if the user clicks "Exit"
|
||||||
|
4. Add a button on the front page (will move to a menu in the future!)
|
||||||
|
5. Success!!!!!
|
Loading…
Reference in a new issue