change view. add current and best score
add functions updateGame and endGame. Calculating the current and the best result
add some comments and refactoring