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.
(Cacher) Vous en avez marre de placer les bateaux ou les pièces d'Espionnage en début de partie? Vous pouvez aller sur l'Editeur de parties et sauvegarder quelques unes de vos positions préférées pour une utilisation future. (pauloaguia) (Montrer toutes les astuces)