Added a function to make animations of value iteration.