dynamic memory freed, small changes

+ I'm not completely sure why you're using pointers in this case, but if you wish to use dynamic memory allocation don't forget to free the memory on program termination.
+ `Rect<Int>` is officially typedef'd as `IntRect` for ease of use purposes in SFML

+ Removed extra spacing between comments and code, program looks more concise

+ Instead of using `bool a` you can directly use the function in your conditional statement

+ Your close event now checks for either closing OR the escape button being pressed