Documentation

Maze

Description

The Maze module allows defining questions and answers for the user to complete a maze.

Properties

The list starts with the common properties, learn more about them by visiting the Modules description section. The other available properties are described below.

Property name Description
Rows The number of cells in one row.
Columns The number of cells in one column.
Number of mazes The number of mazes to win the game. By default 1.
Game mode The module has two modes:
  • Doors - the user must open all the doors to get to the end game element.
  • Letters - the user must gather all letters to get to the end game element.
Questions The list of questions and answers for all mazes.
Property name Description
Question The text shown to the user when they interact with a door or a letter.
Answer The answer that the user must enter to open the door or collect a letter.
Letter The letter which the user will receive when entering a correct answer. The property is used only in the Letter mode. At the end of a maze level, the module will show all letters in the order defined in the property.
Maze number The number of the maze where the question is added. The number is counted from 1.
Is Case Sensitive The answer value is case-sensitive.

Is disabled Allows disabling the module so that the user is not able to interact with it.
Hide control panel Hide the control panel visible by default on the right side of the module.
Translations Translate the texts displayed in the game to the required language.

Supported commands

Command name Params Description
hide --- Hides the module if it is visible.
show --- Shows the module if it is hidden.
disable --- Disables the navigation.
enable --- Enables the navigation.
moveUp --- Moves the player up.
moveDown --- Moves the player down.
moveLeft --- Moves the player to the left.
moveRight --- Moves the player to the right.

Events

The Maze module sends the ValueChanged type events to the Event Bus when the player has opened a door.

Field name Description
Item opened
Value The number of the door as a string.
Score N/A

The Maze module sends the ValueChanged type events to the Event Bus when the player has collected a letter.

Field name Description
Item gathered
Value The letter that was collected.
Score N/A

The Maze module sends the ValueChanged type events to the Event Bus when the player has finished one maze.

Field name Description
Item Maze number
Value 1
Score 1

The Maze module sends the ValueChanged type events to the Event Bus when the player has finished all mazes.

Field name Description
Item all
Value 1
Score 1

CSS classes

Class name Description
Maze-wrapper-menu/td> DIV which surrounds the menu at the left side of the module. If the hide navigation bar is enabled, the width of this wrapper is zero.
Maze-wrapper-game-container DIV which surrounds the game elements at the right side of the module. If the hide navigation bar is enabled, the width of this wrapper is 100%.
Maze-wrapper-menu-controls DIV which is surrounding the navigation buttons.
Maze-wrapper-menu-controls-up The Up button.
Maze-wrapper-menu-controls-down The Down button.
Maze-wrapper-menu-controls-left The Left button.
Maze-wrapper-menu-controls-right The Right button.
Maze_room_image_top_left_right_bottom DIV which contains as background the closed top, left, right, and bottom walls image. This element may be rotated by the module.
Maze_room_image_top_left_right DIV which contains as background the closed top, left, and right walls image. This element may be rotated by the module.
Maze_room_image_top_left DIV which contains as background the closed top, left walls image. This element may be rotated by the module.
Maze_room_image_top_bottom DIV which contains as background the closed top and bottom walls image. This element may be rotated by the module.
Maze_room_image_top DIV which contains as background the closed top wall image. This element may be rotated by the module.
Maze_player_element DIV which contains as background the player image.
Maze_treasure_element DIV which contains as background the end-level image in the Doors game type.
Maze_door DIV which contains the closed door as a background image.
Maze_door_opened DIV which contains the opened door as a background image.
Maze_room_left_top_dot Sometimes a maze needs to complete an empty dot in the connection between walls. This element contains this dot in the left top corner as a background image.
Maze_game_question_background A background element while showing a question.
Maze_game_question_container DIV element which is surrounding questions' elements.
Maze_game_question_container_question_input An input for the player's answer.
Maze_game_question_container_question_apply_text DIV element which contains the text for entering an answer. Text is set as ::after class.
Maze_letters_end_level_next_maze_button A button that is shown at the end level in the Letters game mode when going to the next level.
Maze_game_end A background element when the player completes all mazes.
Maze_letters_end_level_answer_wrapper DIV which surrounds the elements in the end level in the Letters game mode.
Maze_game_end_text DIV which contains the end game text. The text is set as ::after class.
Maze_letters_end_level DIV which the user must enter to the end level in the Letters game mode.
Maze_letters_end_level_background DIV which is a background element in the end level in the Letters game mode.
Maze_letters_letter_element DIV element which contains a letter answer in the end level in the Letters game mode.
Maze_letters_end_level_answer_letters_container DIV which is surrounding the answer letters.
Maze_letters_room_letter DIV which contains a letter.
Maze_game_question_container_question_apply DIV which contains the OK button text while entering an answer. The text is set as ::after class.

Demo presentation

Demo presentation contains examples of how to use the Maze module.