Skip to content

Commit c893c21

Browse files
authored
Create README.md
1 parent 14b4dbd commit c893c21

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Java-Algorithm-Visualization
2+
![GitHub Logo](/assets/icon.png)
3+
4+
A library to visualize your algorithms in Java.
5+
6+
## Add the library
7+
Just visit the releases tab and download the newest '.jar' file (https://github.com/marcomsl/Java-Algorithm-Visualization/releases).
8+
9+
Now it depends on your IDE how you can import it:
10+
11+
Eclipse: Project => Properties => Java Build Path => Libraries => Add JAR ...
12+
13+
IntelliJ: https://www.jetbrains.com/help/idea/library.html
14+
15+
## Usage of the library
16+
If you've programmed your algorithm, you just need to create a 'AlgorithmVisualizer' value in your main class like this:
17+
```
18+
AlgorithmVisualizer algorithmVisualizer = new AlgorithmVisualizer();
19+
```
20+
Now you need to call your method and pass the array as parameter, like this for example:
21+
22+
```
23+
bubblesort(algorithmVisualizer.getArray());
24+
```
25+
26+
## Animation
27+
Now you actually 'connected' your algorithm with the library, but you actually should add a 'delay' after every operation in your algorithm, because otherwise your algorithm would be sorted instantly.
28+
29+
You can easily just add
30+
```
31+
Thread.sleep(30);
32+
```
33+
whenever your values are changing. I would recommend a value between 20-50.
34+
35+
## Have fun!
36+
Now, this is it. Enjoy your little animaition and maybe some updates in the future!

0 commit comments

Comments
 (0)