The twist in the tale is a familiar and well-used device in sci-fi writing, particularly in the golden era - many Asimov stories, for example, seem to be constructed purely to end on a (bad) pun. Some twists are of course better than others - but can the surprise ending actually be detrimental to some novels?
I recently read The Squares of the City. John Brunner's novel of 1965 combines town planning, politics, mind control and sublimated civil war, structured around a chess metaphor. My copy has a cover by Peter Goodfellow combining chess, computer and architectural imagery.
Boyd Hakluyt is an Aussie traffic expert whose work takes him to the Ciudad de Vados, a futuristic city built by the dictator of Aguazul, a fictional South American state. He is hired to redesign the road system in order to disperse the slums, but becomes increasingly drawn into the tension between the citizens and the poorer nationals who are resentful of the city's wealth.
Chess is Aguazul's national sport; a key scene features a Prisoner-style live re-enactment of a chess game watched by the two political leaders (dictator Vados and minister Diaz). The two political movements are more evenly matched than they first appear, and the plot is a series of moves and counter-moves as characters are blocked, taken out of play (sometimes murderously) or exchanged; similarly Hakluyt receives expositions from both sides, often reversing his allegiance. Femme fatale Maria Posador tells Hakluyt, while beating him soundly at chess, that "each move must be seen in relation to the whole." Hakluyt gradually moves from his initial belief that people don't mind being governed - they just resent the mechanisms of government - to an understanding that the situation is more complex, and is both about the extent of control and the awareness of the control. Chess and town planning are both good metaphors - they both revolve around freedoms and restrictions of movement.
This particular rabbit-hole runs deeper still. The book is in fact a novelization of a real championship chess match from 1892, between Wilhelm Steinitz and Mikhail Chigorin, with chessmen represented by characters and institutions - the author helpfully provides details in the afterword which is fascinating. Iain M. Banks covers some similar ground in his novel The Player of Games - again the board game, the complex Azad, is a metaphor for political control, and the Player, Culture gamer Gurgeh, has to see the real poverty and cruelty of the kingdom to understand what he is playing for (naturally he is shown this by his drone companion). Ideas about the relationship between games and real life continue in the more recent Matter.
This novel ought to have a great deal of literary depth - it's a clever concept and is extremely well realised, and it has a lot of intelligent things to say about human relations and control. And it succeeds - almost. What lets it down is the ending which takes the metaphors and turns them into a pointless, literal reality that just dissipates the energy that the novel builds up so well.
Read it. But skip the last chapter and write your own.