On each turn, the prisoner secretly chooses whether or not they expect to be killed on that day. Then the executioner chooses whether or not to kill the prisoner. The game ends on the turn the executioner decides to kill the prisoner. If the prisoner wasn't expecting to die, the executioner wins; otherwise, the prisoner wins.
The important detail here (which is obscured by the logical perspective) is when the prisoner is allowed to expect to die. If they're allowed to expect their death on every single day, the prisoner can just do that and win automatically. If they can only expect to die once, there's a situation the usual paradoxical argument doesn't consider: that the prisoner has survived until Thursday but has already used their chance to expect to die. In this case, they know they're going to die on Friday, but there's nothing they can do about it.