Final commented  version of mario.c and greedy.c