In The Name of Allaah, The Most Merciful, The Bestower of Mercy
Ibn Abdul Haadee [rahimahullaah] said:
When he [shaikhul Islaam Ibn Taymiyyah] was imprisoned, he found the prisoners preoccupied with various types of games by way of which they pass the time, such as chess, backgammon and the likes, which [lead people] to neglect the five daily prayers. The Shaikh [Ibn Taymiyyah [rahimahullaah] strongly disapproved of that. He commanded them to adhere to the five daily prayers and to turn to Allaah through performance of righteous deeds, glorification of Allaah, seeking forgiveness for their sins and supplication.
He acquainted them with what they were in need of from the Sunnah, aroused their desire for it and urged them towards it, until a lot of good came about in the prison due to that which was [present] in the prison, such as preoccupation with knowledge and [affairs] of the Religion, and became better than many of the schools. And it became [such] that many among the prisoners chose to remain with him after they were released and those returning to the prison [i.e. revisiting to benefit from Ibn Taymiyyah] were so numerous that it became crowded.
[Source: Al-Uqood Ad-Du’riyyah Fee Dhikri Manaaqib Shaikhul Islaam Ibn Taymiyyah 330-331. Abridged and slightly paraphrased]