


It may be possible to create an interactive, GUI version of the game for the JHS front end.When the player loses, display the mine that was cleared differently to other mines in the revealed map.Record "high" scores for various sized minefields.Display a timer that counts the length of time required to solve the field.A 5x5 grid will compile 25 squares with 10 dogs and 15 kittens/default doors. For this game, we will create a 5x5 grid with ten dogs. Make the minefield image resize to fit the current size of the window With our grid creation and functionality out of the way, we can now pass our game props to our board and assign the number of squares we want, and how many dogs (mines) we want to be randomized.Create a child dialog for the Game|Options menu item, that among other things could enable the user to changing the size/difficulty of the minefield.It then seemed to be a nice simple application that might serve as a type of Rosetta stone itself, showing how to translate a GUI from the J6 window driver (wd) toolset to the new J7 Gtk toolset.Īs J tools and APIs for working with Gtk evolve, the Gtk scripts should hopefully get shorter and less complex. The engine for this game began as a solution to a RosettaCode programming task. Obviously you can only run some scripts in a compatible environment, so the uiwd.ijs script can currently only be run using J6, and the gui/gtk based scripts will only run in J7. Use Package Manager to install the games/minesweeper addon.īelow are some examples of running various UI versions.
