Revised logic for updating board squares by using coordinate objects.