12/25/2023 0 Comments Simple minesweeper game in prolog![]() We first attempted to thread a 2D array representation of the local state throughout our event handlers and callbacks, but quickly realized that Prolog is pass-by-value. Having object-oriented capabilities in XPCE did help a bit in general programming as it was approachable and familiar which helped us with the static elements of our design.Īs for the game logic, we realized that the best way to track the game state is through careful use of “assertz” and “retract”. This may hinder larger-scale games due to the inefficiencies involved. We also learned that the library used callbacks for the event listeners that had their own scope which made it difficult to coordinate game state efficiently and we were forced to use singleton UI elements to record the global state. ![]() This reduced the approachability and made the use of this library less suitable for making games. We will be using the XPCE library for the GUI and using random tile map generation.įrom the GUI side of the project using the XPCE library, we had to spend a significant amount of time learning the UI concepts from an old instruction manual as it was the best resource available rather than modern documentation. How suitable is prolog for the classic Minesweeper game in terms of the UI and event handling aspects? Is it possible to effectively replicate classic games using SWI prolog? Authors: Connor Quigg, Aidan Frost, James Zang
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |