added instance_on_target function to check if there is a figure of the same colour on the target position