I visited your GitHub and quickly checked your source code, I found a very serious formatting issue that may cause your program's issue in line #238 in gameviewplay.pas.
I believe if I spend more time reading your code I will find more bugs that are directly/indirectly caused by incorrect code formatting.