Tested successfully the latest version.
I am sure that the flickering problem can be solved with standard libraries.
Working in the same time on the articial opponent AND on a GUI is tiring. (I speak by experience.)
If you come back to this project, I would suggest that you break it in two programs using a common textual protocol (1) for dialoging with each other. You could use
this unit (in your GUI). On the engine side, you just need
ReadLn and
WriteLn. Example
here.
(1) Why not the protocol used by
Scan and its GUI?