Added window.isGameOver, a variable. Use in render()

Added endGame() and startGame() functions in logic.js