Allgaier fought in the Napoleonic wars between Austria and France. In 1809, he worked in an army hospital, where he became ill with asthma. When the hospital was moved to Prague he became its accountant. He returned to Vienna in 1816 where the Emperor gave him a small pension. To make extra money, he played chess in the cafés. His games were said to be brilliant and focused on attacking. When he played, people would come to watch. One man, Santo Vito, wrote down some of these games which were included in Allgaier's book. He would play anyone for the price of one gulden. The price also included a short lesson after the game. Allgaier was always looking for ways to make money. This is probably why he worked with Mälzel to operate the Turk. Allgaier played hidden inside the chess machine in 1809. He is believed to be the player controlling the Turk when it won a game against Napoleon at Schönbrunn Palace.