started rewriting the game in angular js