One problem you are running into is that your xcor and ycor are not integers -- they are numbers like 3.18293474 and 7.1323432425, so they are never EXACTLY equal to the homex and homey variables.
To fix this, turtles can access the pxcor and pycor variables of the patch that they are on top of. Your code would change to:
if pxcor = homex [set color pcolor]
if pycor = homey [set color pcolor]
However, in this case, you'll see that they change their color if they reach either the homex column or the homey row. It sounds like you wanted them to change ONLY when they arrive at the homex homey patch. To do this, you'd use the AND connector, so that the code only runs when BOTH conditions are true:
if pxcor = homex AND pycor = homey [ set color pcolor ]
However, right now all of your patches are black, so this will make all of your turtles look like they disappear!
You probably wanted to make it so that your turtle would change to the original pcolor of the patch (from the image), rather than the current pcolor of the patch (which is black). To do this, you'll need to add another turtles-own variable (maybe original-pcolor
), and set it to the pcolor when the turtle is first sprouted, and then later you can do
set color original-pcolor
Hope this helps!