Added collisions with board borders.