 Casino Royale was inspired by certain incidents that took place during Fleming 's wartime career at the Naval Intelligence Division ( NID ) , or by events of which he was aware . On a trip to Portugal , en route to the United States , Fleming and the NID Director , Admiral Godfrey , went to the Estoril Casino . Because of Portugal 's neutral status , Estoril 's population had been swelled by spies and agents from the warring regimes . Fleming claimed that while there he was cleaned out by a " chief German agent " at a table playing chemin de fer . Admiral Godfrey told a different story : that Fleming only played Portuguese businessmen , and afterwards fantasised about playing against German agents . 
