added contributing to ReadMe

This commit is contained in:
Rolf Martin Glomsrud 2023-03-01 00:10:00 +01:00
parent d151bfb71c
commit 3dc71499ac

View file

@ -13,3 +13,17 @@ WebAssembly version can be found here [beepsort.polsevev.dev](https://beepsort.p
- Clean up user interface, perhaps move to JS?
- Add more visualization modes (circle, points etc)
- 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!!!!!