The laptop turns off while playing games. It works fine with all other programs, but after running a video game for a while the laptop just turns off by itself without any warning.
The laptop turns off because of overheating.
Possible troubleshooting steps and repair solution:
Most likely the laptop turns off while playing games because the heat sink is clogged with dust and the laptop overheats. Video games require a lot of computing resources and push the CPU and video card to limits. Because of that, the laptop runs hotter while playing games. Apparently, the CPU is getting so hot that the laptop turns off by itself to prevent the damage.
You can fix the problem by cleaning the heat sink. There are two ways:
1. Blow off dust without opening the laptop. Find an air compressor or buy a can of compressed air and spray it into the fan grill on the bottom of the laptop. This will remove most dust from the fan and heat sink and should fix the problem at least for a while.
2. Disassemble the laptop, access the heat sink and clean it. This is the proper way of cleaning but requires some technical skills.