Actually brute-forcing this would not be so difficult. All you do is generate a tree of possible moves/paths as you progress throughout the game and then check which tree branch used the least amount of moves. Not so hard to code but it would require quite a lot of processing.
But there is a better way. As far as I can see the best strategy in this game is to go and always clear the color that is going to expose as many blocks to be cleared in the next move as possible. And when I say expose as many blocks I don't mean only the blocks that border the future grayed-out area but also their respective neighbors that are of the same color.
So you would just have to implement an algorithm that would be able to predict of how many squares of each color will you be able to clear after making certain step and then proceed making steps with best gains.
In order words you would make an AI (Arithmetic Inteligence)
Yes at the moment Inno Setup is not available for Linux. I'm guessing the main reason for that is the fact that Inno setup is built using Delphi which got capability of making Linux based applications with version 10.2 and you still need to use Third Party FMX for Linux framework if you want to make applications with UI.
Any way since you are using FPC/Lazarus it might not be bad to ask around FPC/Lazarus community of what installers FPC/Lazarus people commonly use on Linux. Based on the fact that Inno Setup is also open source I would not be surprised if someone from FPC community make their own port of Inno Setup into FPC that also supports Linux. I'm not actively using FPC/Lazarus myself so I'm not up to date of that FPC community is working on.
But on the other hand installers are generally not so popular on Linux any way. On linux it is way more popular to use packages or traballs. You can read a bit more on this and possible installer alternatives here: https://unix.stackexchange.com/a/398342
Bookmarks