From 2b2eabd63a179306e2a729368638b7b37ec42c3d Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 30 Sep 2021 11:35:09 +0200 Subject: [PATCH] rogueviz:: added sokoban to highdim-demo --- rogueviz/highdim-demo.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/rogueviz/highdim-demo.cpp b/rogueviz/highdim-demo.cpp index 9bfec512..df2de4bc 100644 --- a/rogueviz/highdim-demo.cpp +++ b/rogueviz/highdim-demo.cpp @@ -4,6 +4,8 @@ namespace rogueviz { namespace magic { void magic(int i); } +namespace crystal_sokoban { void run_sb(); } + namespace colorpicker { int current_step; @@ -642,6 +644,19 @@ tour::slide *gen_high_demo() { } }); + v.emplace_back( + slide{"3D Sokoban", 999, LEGAL::NONE, + "A three-dimensional Sokoban puzzle visualized using H2.\n\n" + "The puzzle is designed so that all three dimensions matter.\n\n" + "Press 'r' or Backspace to undo moves.", + [] (presmode mode) { + sync(mode, 0); + if(mode == pmStart) { + crystal_sokoban::run_sb(); + } + } + }); + callhooks(pres::hooks_build_rvtour, "highdim", high_slides); pres::add_end(v); return &high_slides[0];