function checkVictory(){
      if(isSolved()){
        $scope.$emit("victory");
      } 
    }
/*
     * broadcast victory if the blocks are all in
     * correct location
     */
broadcast victory if the blocks are all in
correct location
broadcast victory if the blocks are all in correct location
function checkVictory(){
      if(isSolved()){
        $scope.$emit("victory");
      } 
    }
function checkVictory ( ) { if ( isSolved ( ) ) { $scope . $emit ( "victory" ) ; } }
broadcast victory if the blocks are all in
 correct location
broadcast victory if the blocks are all in correct location