And it's entertaining, too.

Red Tetris pieces on green background
Credit: PixHouse/Getty Images

If you’re always trying to beat a craving, the solution might actually be fun. According to new research from Plymouth University and Queensland University of Technology, a short game of Tetris can reduce cravings for food, drugs, coffee, sleep, and more by about 20 percent.

The study, published in the journal Addictive Behaviors, showed that playing Tetris for three minutes at a time helped participants manage their cravings for various substances and activities.

“Playing a visually interesting game like Tetris occupies the mental processes that support that imagery; it is hard to imagine something vividly and play Tetris at the same time," study author Jackie Andrade, of the School and Cognition Institute of Plymouth University, said in a statement.

For the study, 31 undergraduates between the ages of 18 to 27 were prompted by text messages seven times a day to record any cravings. The participants were also encouraged to report cravings even when not prompted. Half of the group was then required to play Tetris on an iPod for three minutes. After playing, they reported their cravings again.

The researchers found that those who played Tetris reported a decrease in their cravings, from 70 to 56 percent. Study author Jon May of Plymouth University says the impact of the game on cravings was consistent and didn’t seem to wear off.

“This finding is potentially important because an intervention that worked solely because it was novel and unusual would have diminishing benefits over time as participants became familiar with it,” May said in the statement.

Researchers had no findings, however, on how to stave off a Tetris addiction.