The game is finished when one or both codes are solved. Since the results of moves are determined at the same time, it is possible that both players solve the opponent's code at the same turn. In this case, the game is a draw. Otherwise, if one player solves the code, he wins the game.
Since this takes away the advantage of the player going first, I'm glad this rule is there.