Are the games installed on the machine or are they on the web? If they're on the machine, you may be able to use an app like Saent https://www.saent.com/ to set rules and make class time focused. If they're online, then you can use a browser extension like Leechblock http://www.proginosko.com/leechblock/ to set time limits on certain sites.

In terms of organization, would the school let you have a extra set of books so there is always a set at school and at home?