Yes, you're right, the gold is random. My goal was just to give a little fun surprise while playing and to have a bonus if you clear more of the level, not to make it super optimizable. Thanks for checking it out and sharing your feedback!
I didn't mean the player should be able to optimize the game itself. My comment were more about the mechanics behind the gold being less than optimal. Also I have been "checking it out" for years. It's one of my favourite Landmine/minesweeper versions