+SmooveGamer There are three likely causes for the rebooting: (1) excessive heat, (2) power issue, or (3) software.
(1) excess CPU heat will thermal throttle the CPU and cause it to underclock itself. If the temperature gets too high, over 100+ C, then the system will reboot to protect itself. Excess heat inside the case can also make the southbridge or VRM to reboot the system.
(2) Your Cooler Master B500 is listed as un-tiered on the Tom's hardware PSU tier list. I couldn't find a review on JonnyGuru, but according to their message board, it's not a good quality PSU.
Please download and run HWMonitor ( http://filehippo.com/download_hwmonitor/ ). Please play a game, monitor your CPU temp, and report it back here. Also, could you post a few photos of the inside of your case to imgur? It would give me a good idea of the airflow that you have in your computer. Please don't forget to find the temps.
Addendum: There is a fourth cause but it's unlikely. I've seen a few instances where a displayport cable has an incompatible pin layout and can cause the computer to reboot. Sounds impossible but it's true. Again, I think it's unlikely the cause, but I figured that I'd mention it. I've only seen this twice in my life.