Overview
"The Royale" is the twelfth episode of the second season of the American science fiction television series Star Trek: The Next Generation, the 38th episode overall. It was originally released on March 27, 1989, in broadcast syndication.
Set in the 24th century, the series follows the adventures of the Starfleet crew of the Federation starship Enterprise-D. In this episode, Riker, Data, and Worf become trapped in a strange hotel on a planet otherwise incapable of supporting human life.
Plot
Following a tip from a Klingon ship, the Federation starship Enterprise, under the command of Captain Jean-Luc Picard, finds debris from an Earth ship orbiting an uninhabitable alien planet. A sample of the debris beamed aboard shows NASA markings and a 52-star American flag, dating the ship to the mid-to-late 21st century and establishing that it had traveled far beyond the capability of ships of that era. Scans of the planet reveal a small anomalous area capable of supporting human life, so Commander Riker, Lt. Worf, and Lt. Commander Data beam down to investigate, and find a revolving door standing alone in a dark void. Upon entering, they find themselves in an old Earth-style hotel and casino called The Royale, where they are cut off from contact with the Enterprise.
The away team soon discovers they are trapped inside the casino, and after making several unsuccessful attempts to leave, they decide to explore the building. In a hotel room, they find the desiccated but preserved remains of Col. Stephen Richey, a NASA astronaut, and a pulp novel entitled Hotel Royale. Upon reading Richey's diary, they learn that his starship had launched in 2037, been accidentally contaminated by an unknown alien race, then transported through a wormhole across the galaxy; he was the only survivor. Taking pity on him, the aliens created The Royale for him, thinking the novel's story represented humans' preferred way of living, whereas Richey found it unbearable thanks to the poor quality of the novel. He lived there for 38 years until his death, and his remains have been in the room for 283 years.
From Wikipedia (CC BY-SA 4.0).