Added controller.js containing all game logic.