[FREE] Lock Puzzle A circular number puzzle component for ai2

🧩 LockPuzzle

An extension for MIT App Inventor 2.
This Extension is developed by th using Fast.
A circular number puzzle component for ai2.
Rotate rings to match number sums with target values.
The puzzle consists of concentric rings with numbers. The innermost ring containstarget values (sums),
and players must rotate the outer rings so that the numbers
in each section (as a ring Value) add up to the target value in that section.
Telegram | GitHub
Blogger | YouTube
Find More Extension
Terms & Conditions

:memo: Specifications


:package: Package: io.th.lockpuzzle.lockpuzzle
:floppy_disk: Size: 14.25 KB
:gear: Version: 1.0
:iphone: Minimum API Level: 7
:date: Updated On: 2025-03-25T18:30:00Z
:computer: Built & documented using: FAST-CLI v2.8.0
:arrow_down: Download aix
io.th.lockpuzzle.lockpuzzle.aix (14.3 KB)
:arrow_down: Aia
lock_puzzle.aia (18.2 KB)
:placard: More info and apk on GitHub

Blocks

RingRotated_Event
PuzzleSolved_Event
ProgressChanged_Event


Difficulty_Method
DefaultRingColor_Method
BackgroundColorRGB_Method
BackgroundColorARGB_Method
TransparentBackground_Method
RingColor_Method
ResetGame_Method
Movable_Method
InitializeGame_Method
GradientBackground_Method
FirstRingColor_Method


GetProgress_Method
GetMovable_Method
GetDifficulty_Method
IsSolved_Method


FontSize_Set_Property
FontSize_Get_Property
DividerWidth_Set_Property
DividerWidth_Get_Property
BackgroundColor_Set_Property
BackgroundAlpha_Set_Property
OutlineWidth_Set_Property
OutlineWidth_Get_Property


Demo

blocks


Screenshot_2025-03-26-23-47-45-499_appinventor.ai_Techhamara91.lock_puzzle.jpg



15bb4b79-37cb-4728-a76d-c482786658c3
e6351e28-30da-458a-9dda-0b8382bdb97b


Events:

LockPuzzle has total 3 events.

:yellow_heart: RingRotated

Ring was rotated.

Parameter Type
ringNumber number
sections number

:yellow_heart: ProgressChanged

Progress changed.

Parameter Type
progress number

:yellow_heart: PuzzleSolved

Triggered when the puzzle is solved.

Methods:

LockPuzzle has total 15 methods.

:purple_heart: InitializeGame

Initialize the game inside a VerticalArrangement.

Parameter Type
arrangement component

:purple_heart: BackgroundColorRGB

Set background color using RGB values

Parameter Type
red number
green number
blue number

:purple_heart: BackgroundColorARGB

Set background color using ARGB values

Parameter Type
alpha number
red number
green number
blue number

:purple_heart: TransparentBackground

Set transparent background

:purple_heart: GradientBackground

Set gradient background

Parameter Type
startColor number
endColor number
isVertical boolean

:purple_heart: ResetGame

Reset the game to the initial state.

:purple_heart: Difficulty

Set the game difficulty like 1, 2, 3, etc.

Parameter Type
newDifficulty number

:purple_heart: Movable

Set whether rings can be moved.

Parameter Type
canMove boolean

:purple_heart: GetMovable

Get whether rings can be moved.

:purple_heart: GetDifficulty

Get current difficulty level.

:purple_heart: IsSolved

Check if puzzle is solved.

:purple_heart: GetProgress

Get current progress (0-100).

:purple_heart: RingColor

Set the color of a specific ring (index starts from 0)

Parameter Type
ringIndex number
color number

:purple_heart: DefaultRingColor

Set the default color for all rings

Parameter Type
color number

:purple_heart: FirstRingColor

Set the color of the first (center) ring

Parameter Type
color number

Setters:

LockPuzzle has total 5 setter properties.

:green_heart: BackgroundColor

Set background color of the pattern view

  • Input type: number

:green_heart: BackgroundAlpha

Set background alpha (0-255)

  • Input type: number

:green_heart: FontSize

Set the font size of numbers

  • Input type: number

:green_heart: OutlineWidth

Set the width of ring outlines

  • Input type: number

:green_heart: DividerWidth

Set the width of section dividers

  • Input type: number

Getters:

LockPuzzle has total 3 getter properties.

:green_circle: FontSize

Set the font size of numbers

  • Return type: number

:green_circle: OutlineWidth

Set the width of ring outlines

  • Return type: number

:green_circle: DividerWidth

Set the width of section dividers

  • Return type: number

Thanks

TechHamara

3 Likes

can you explain this? which area is considered as a section?
outermost ring with target values? or do you mean innermost?

Post updated..

Innermost ring with target values. and outermost ring with puzzle values.