Test your knowledge on Prim’s Algorithm

I have created a game for Koding.hackaton which is designed using HTML5 canvas to test one’s knowledge on prim’s algorithm. A graph is automatically generated. When one clicks on a line on the graph it gets selected. Continue to select lines till you obtain a minimum spanning tree using the Prim’s algorithm. Once you have selected the minimum spanning tree click on the button ‘Check’ to check your answer. If the answer is correct “Success” will appear and the graph will change to one which is more complex. If “Failed” appears you can always ‘Reset’ the game to play again at the same level of difficulty. If you make a mistake or otherwise you can always ‘Reset’ the game to get another graph having the same level of difficulty.

playgame

Fork my work here.

Leave a comment