changed when boundary warnings appear
fixed x,y inversion when displaying tiles on the JPanel