Math for drawing grid in selection screen finished