Changed the way I calculate where a new square is going to be placed.