From 3dc71499ac33e8fe236a48f40bcf7118c898d7d9 Mon Sep 17 00:00:00 2001 From: polsevev Date: Wed, 1 Mar 2023 00:10:00 +0100 Subject: [PATCH] added contributing to ReadMe --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 80ee625..19cbc0f 100644 --- a/README.md +++ b/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? - 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!!!!! \ No newline at end of file