testing converting javascript to angularjs (tic-tac-toe)