Corridors in Qt

Some time ago I made a fully working clone of Dungeons & Diagrams in vanilla JS and Three.js. I used JSDoc-comments for some kind of help/hint during development. I never really finished it, but it was a good learning-experience for Three.js and Vue, which I used for the UI. This game is a great practice for my current QtQuick adventures! I already have all the game-mechanics done. And since QML can talk to JS, and I designed the functions to be pure and stateless, it was a breeze to get a first version running. JS in QML/QtQuick is a bit more rudimentary than in today’s browsers. There is no import/export module-handling. Everything is global. In my new version, the current board-state is being held by a QtObject, which uses the JS-modules to update the board depending on what the player clicks.

Every function receives the current game-board, and returns a new board after all modifications are applied. Row/Col-Numbering and adding/removing walls works. The next feature will be coloring the numbers if the wall-counts match, and some kind of YOU WIN message.