Added code to make sure that tank does not go off the screen and
crash the program with a segfault.