@(you need an account to see links)
With a 1920 x 1080 screen and with the game window maximized I had to move the area of the replay button screenshot.
Code:
Rectangle replayButtonArea = new Rectangle(gameParameters.originX + (gameParameters.squareDimension * 3) - 50, gameParameters.originY + (gameParameters.squareDimension * 4), 100, 100);
Before:
After:
But it still can't detect it.
Update:
Added some debug code, it doesn't seem to match the colors correctly and only tries one time:
Update2:
I've found 2 curly brackets missing when comparing the actual color with the expected one.
Update3:
I had to change the replay button color to -12498610, might be because of moving the screenshot
Now it works fine for me, I also changed the random wait to 5 seconds to make sure it waits for combos, lag and all those things.