Function GetValidPlayerName(OtherPlayer:String) : String; Var PlayerName : String; Begin Repeat Readln(PlayerName); If PlayerName = '' OR PlayerName = OtherPlayer Then Write('That was not a valid name. Please try again: '); Until PlayerName <> '' AND PlayerName <> OtherPlayer; GetValidPlayerName := PlayerName; End;