Setting: A hall in Elsinore Castle (not a churchyard—Scene 1 is the graveyard).
Enter Hamlet and Horatio.
Hamlet recounts how he swapped the king's letter, sending Rosencrantz and Guildenstern to their deaths.
Enter Osric — invites Hamlet to fence with Laertes.
Hamlet accepts despite misgivings.
Enter King, Queen, Laertes, Lords, Foils, Wine.
The duel: Laertes wounds Hamlet with the poisoned foil; they scuffle, swords swap; Hamlet wounds Laertes. Queen drinks poisoned wine, dies. Laertes confesses the plot; Hamlet stabs Claudius with the poisoned foil and forces the wine. Claudius dies. Laertes dies. Hamlet, dying, names Fortinbras successor; asks Horatio to tell the story. Enter Fortinbras. Hamlet dies. "Goodnight, sweet prince."
Note: The graveyard/Yorick scene is Act 5, Scene 1. Scene 2 is the final duel and resolution.