Changed document height and width detection to work on desktop browsers.

The document.width and document.height properties were causing the game to not work by returning value 0 on desktop browsers. They have been swapped with window.innerWidth and window.innerHeight.