Game logic added

Updates to the javascript code and presentation views