brick-engine-js 1.0.9 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (280) hide show
  1. package/dist/app.js +1 -4952
  2. package/dist/brick-engine.js +1 -4970
  3. package/dist/css/brick-engine.bundle.css +1 -1
  4. package/dist/docs/GAME_DEVELOPER_GUIDE.html +1 -1
  5. package/dist/docs/brick-engine-guide.html +1 -1
  6. package/dist/docs/getting-started.html +1 -1
  7. package/dist/docs/jsdoc_standard.html +1 -1
  8. package/dist/docs/publishing.html +1 -1
  9. package/dist/docs/reference/interfaces/modules/Session.html +1 -1
  10. package/dist/docs/reference/modules/GameMenu.html +1 -1
  11. package/dist/docs/reference/modules/GameSession.html +1 -1
  12. package/dist/docs/reference/modules/InitialStateSnapshot.html +1 -1
  13. package/dist/docs/reference/modules/SessionModal.html +1 -1
  14. package/dist/docs/testing_best_practices.html +1 -1
  15. package/dist/index.html +1 -16
  16. package/dist/{index.d.ts → types/index.d.ts} +1 -0
  17. package/dist/vendor/p5.min.js +1 -1
  18. package/package.json +2 -4
  19. package/dist/app.js.map +0 -1
  20. package/dist/brick-engine.js.map +0 -1
  21. package/dist/css/app.bundle.css +0 -824
  22. package/dist/css/app.bundle.css.map +0 -1
  23. package/dist/css/brick-engine.bundle.css.map +0 -1
  24. package/docs/GAME_DEVELOPER_GUIDE.adoc +0 -167
  25. package/docs/brick-engine-guide.adoc +0 -87
  26. package/docs/diagrams/lifecycle.mmd +0 -19
  27. package/docs/documentation_style_guide.adoc +0 -210
  28. package/docs/getting-started.adoc +0 -147
  29. package/docs/images/lifecycle.svg +0 -1
  30. package/docs/jsdoc_standard.adoc +0 -109
  31. package/docs/publishing.adoc +0 -58
  32. package/docs/reference/enums/Color.adoc +0 -35
  33. package/docs/reference/enums/ControlEventType.adoc +0 -28
  34. package/docs/reference/enums/ControlKey.adoc +0 -34
  35. package/docs/reference/enums/FontAlignment.adoc +0 -43
  36. package/docs/reference/enums/FontSize.adoc +0 -31
  37. package/docs/reference/enums/Sound.adoc +0 -42
  38. package/docs/reference/enums/StateProperty.adoc +0 -33
  39. package/docs/reference/helpers/CellHelper.adoc +0 -37
  40. package/docs/reference/helpers/ControlInputHandlerHelper.adoc +0 -57
  41. package/docs/reference/helpers/CoordinateHelper.adoc +0 -118
  42. package/docs/reference/helpers/RelativeValuesHelper.adoc +0 -53
  43. package/docs/reference/interfaces/Debuggable.adoc +0 -29
  44. package/docs/reference/interfaces/GameModules.adoc +0 -35
  45. package/docs/reference/interfaces/Initializable.adoc +0 -24
  46. package/docs/reference/interfaces/RendererInitializable.adoc +0 -33
  47. package/docs/reference/interfaces/StateSyncable.adoc +0 -41
  48. package/docs/reference/interfaces/modules/Control.adoc +0 -98
  49. package/docs/reference/interfaces/modules/Grid.adoc +0 -411
  50. package/docs/reference/interfaces/modules/Renderer.adoc +0 -34
  51. package/docs/reference/interfaces/modules/RendererComposite.adoc +0 -57
  52. package/docs/reference/interfaces/modules/Score.adoc +0 -107
  53. package/docs/reference/interfaces/modules/Session.adoc +0 -66
  54. package/docs/reference/interfaces/modules/State.adoc +0 -290
  55. package/docs/reference/interfaces/modules/Text.adoc +0 -110
  56. package/docs/reference/interfaces/modules/Time.adoc +0 -119
  57. package/docs/reference/modules/Debugger.adoc +0 -71
  58. package/docs/reference/modules/DisplayRenderer.adoc +0 -55
  59. package/docs/reference/modules/Game.adoc +0 -256
  60. package/docs/reference/modules/GameControl.adoc +0 -139
  61. package/docs/reference/modules/GameGrid.adoc +0 -794
  62. package/docs/reference/modules/GameHudGrid.adoc +0 -38
  63. package/docs/reference/modules/GameMenu.adoc +0 -39
  64. package/docs/reference/modules/GameRenderer.adoc +0 -79
  65. package/docs/reference/modules/GameScore.adoc +0 -138
  66. package/docs/reference/modules/GameSession.adoc +0 -43
  67. package/docs/reference/modules/GameSound.adoc +0 -111
  68. package/docs/reference/modules/GameState.adoc +0 -318
  69. package/docs/reference/modules/GameText.adoc +0 -139
  70. package/docs/reference/modules/GameTime.adoc +0 -141
  71. package/docs/reference/modules/HudRenderer.adoc +0 -56
  72. package/docs/reference/modules/InitialStateSnapshot.adoc +0 -47
  73. package/docs/reference/modules/SessionModal.adoc +0 -34
  74. package/docs/reference/types/Axis.adoc +0 -28
  75. package/docs/reference/types/Cell.adoc +0 -29
  76. package/docs/reference/types/ControlCallback.adoc +0 -23
  77. package/docs/reference/types/Coordinate.adoc +0 -29
  78. package/docs/reference/types/GameEntry.adoc +0 -29
  79. package/docs/reference/types/GameEvent.adoc +0 -29
  80. package/docs/reference/types/Piece.adoc +0 -32
  81. package/docs/reference/types/RendererMetrics.adoc +0 -29
  82. package/docs/reference/types/Vector.adoc +0 -28
  83. package/docs/testing_best_practices.adoc +0 -190
  84. package/public/CNAME +0 -1
  85. package/public/docs/GAME_DEVELOPER_GUIDE.html +0 -727
  86. package/public/docs/brick-engine-guide.html +0 -610
  87. package/public/docs/diagrams/lifecycle.mmd +0 -19
  88. package/public/docs/documentation_style_guide.html +0 -994
  89. package/public/docs/getting-started.html +0 -648
  90. package/public/docs/images/lifecycle.svg +0 -1
  91. package/public/docs/index.html +0 -593
  92. package/public/docs/jsdoc_standard.html +0 -656
  93. package/public/docs/publishing.html +0 -573
  94. package/public/docs/reference/enums/Color.html +0 -533
  95. package/public/docs/reference/enums/ControlEventType.html +0 -505
  96. package/public/docs/reference/enums/ControlKey.html +0 -529
  97. package/public/docs/reference/enums/FontAlignment.html +0 -545
  98. package/public/docs/reference/enums/FontSize.html +0 -517
  99. package/public/docs/reference/enums/Sound.html +0 -558
  100. package/public/docs/reference/enums/StateProperty.html +0 -525
  101. package/public/docs/reference/helpers/CellHelper.html +0 -520
  102. package/public/docs/reference/helpers/ControlInputHandlerHelper.html +0 -569
  103. package/public/docs/reference/helpers/CoordinateHelper.html +0 -703
  104. package/public/docs/reference/helpers/RelativeValuesHelper.html +0 -560
  105. package/public/docs/reference/interfaces/Debuggable.html +0 -501
  106. package/public/docs/reference/interfaces/GameModules.html +0 -544
  107. package/public/docs/reference/interfaces/Initializable.html +0 -495
  108. package/public/docs/reference/interfaces/RendererInitializable.html +0 -517
  109. package/public/docs/reference/interfaces/StateSyncable.html +0 -542
  110. package/public/docs/reference/interfaces/modules/Control.html +0 -648
  111. package/public/docs/reference/interfaces/modules/Grid.html +0 -1256
  112. package/public/docs/reference/interfaces/modules/Renderer.html +0 -522
  113. package/public/docs/reference/interfaces/modules/RendererComposite.html +0 -577
  114. package/public/docs/reference/interfaces/modules/Score.html +0 -669
  115. package/public/docs/reference/interfaces/modules/Session.html +0 -585
  116. package/public/docs/reference/interfaces/modules/State.html +0 -897
  117. package/public/docs/reference/interfaces/modules/Text.html +0 -668
  118. package/public/docs/reference/interfaces/modules/Time.html +0 -684
  119. package/public/docs/reference/modules/Debugger.html +0 -579
  120. package/public/docs/reference/modules/DisplayRenderer.html +0 -557
  121. package/public/docs/reference/modules/Game.html +0 -909
  122. package/public/docs/reference/modules/GameControl.html +0 -716
  123. package/public/docs/reference/modules/GameGrid.html +0 -1910
  124. package/public/docs/reference/modules/GameHudGrid.html +0 -508
  125. package/public/docs/reference/modules/GameMenu.html +0 -538
  126. package/public/docs/reference/modules/GameRenderer.html +0 -589
  127. package/public/docs/reference/modules/GameScore.html +0 -664
  128. package/public/docs/reference/modules/GameSession.html +0 -533
  129. package/public/docs/reference/modules/GameSound.html +0 -636
  130. package/public/docs/reference/modules/GameState.html +0 -922
  131. package/public/docs/reference/modules/GameText.html +0 -701
  132. package/public/docs/reference/modules/GameTime.html +0 -696
  133. package/public/docs/reference/modules/HudRenderer.html +0 -568
  134. package/public/docs/reference/modules/InitialStateSnapshot.html +0 -557
  135. package/public/docs/reference/modules/SessionModal.html +0 -520
  136. package/public/docs/reference/types/Axis.html +0 -505
  137. package/public/docs/reference/types/Cell.html +0 -514
  138. package/public/docs/reference/types/ControlCallback.html +0 -488
  139. package/public/docs/reference/types/Coordinate.html +0 -510
  140. package/public/docs/reference/types/GameEntry.html +0 -514
  141. package/public/docs/reference/types/GameEvent.html +0 -514
  142. package/public/docs/reference/types/Piece.html +0 -506
  143. package/public/docs/reference/types/RendererMetrics.html +0 -514
  144. package/public/docs/reference/types/Vector.html +0 -509
  145. package/public/docs/testing_best_practices.html +0 -770
  146. package/public/favicon.ico +0 -0
  147. package/public/fonts/digital-7.monoitalic.ttf +0 -0
  148. package/public/images/cell.svg +0 -32
  149. package/public/images/close.png +0 -0
  150. package/public/images/games.png +0 -0
  151. package/public/images/github.png +0 -0
  152. package/public/images/letter-a.png +0 -0
  153. package/public/images/letter-d.png +0 -0
  154. package/public/images/letter-j.png +0 -0
  155. package/public/images/letter-s.png +0 -0
  156. package/public/images/letter-w.png +0 -0
  157. package/public/images/meta-image.png +0 -0
  158. package/public/images/number-1.png +0 -0
  159. package/public/images/number-2.png +0 -0
  160. package/public/images/number-3.png +0 -0
  161. package/public/images/number-4.png +0 -0
  162. package/public/images/number-5.png +0 -0
  163. package/public/images/number-6.png +0 -0
  164. package/public/images/splash.gif +0 -0
  165. package/public/index.html +0 -16
  166. package/public/sounds/sound_00.wav +0 -0
  167. package/public/sounds/sound_01.wav +0 -0
  168. package/public/sounds/sound_02.wav +0 -0
  169. package/public/sounds/sound_03.wav +0 -0
  170. package/public/sounds/sound_04.wav +0 -0
  171. package/public/sounds/sound_05.wav +0 -0
  172. package/public/sounds/sound_06.wav +0 -0
  173. package/public/sounds/sound_07.wav +0 -0
  174. package/public/sounds/sound_08.wav +0 -0
  175. package/public/sounds/sound_09.wav +0 -0
  176. package/public/sounds/sound_10.wav +0 -0
  177. package/public/sounds/sound_11.wav +0 -0
  178. package/public/sounds/sound_12.wav +0 -0
  179. package/public/sounds/sound_13.wav +0 -0
  180. package/public/sounds/sound_14.wav +0 -0
  181. package/public/sounds/sound_15.wav +0 -0
  182. package/public/style/body.css +0 -86
  183. package/public/style/buttons.css +0 -233
  184. package/public/style/debugger.css +0 -117
  185. package/public/style/sessionModal.css +0 -155
  186. package/public/style/sourceCodeAndCommands.css +0 -74
  187. package/public/style/splash.css +0 -13
  188. package/public/style/theme.css +0 -137
  189. /package/dist/{bootstrap.d.ts → types/bootstrap.d.ts} +0 -0
  190. /package/dist/{bootstrap.test.d.ts → types/bootstrap.test.d.ts} +0 -0
  191. /package/dist/{config → types/config}/configs.d.ts +0 -0
  192. /package/dist/{config → types/config}/configs.test.d.ts +0 -0
  193. /package/dist/{core → types/core}/Game.d.ts +0 -0
  194. /package/dist/{core → types/core}/Game.test.d.ts +0 -0
  195. /package/dist/{core → types/core}/InitialStateSnapshot.d.ts +0 -0
  196. /package/dist/{core → types/core}/InitialStateSnapshot.test.d.ts +0 -0
  197. /package/dist/{core → types/core}/helpers/CellHelper.d.ts +0 -0
  198. /package/dist/{core → types/core}/helpers/CellHelper.test.d.ts +0 -0
  199. /package/dist/{core → types/core}/helpers/ControlInputHandlerHelper.d.ts +0 -0
  200. /package/dist/{core → types/core}/helpers/ControlInputHandlerHelper.test.d.ts +0 -0
  201. /package/dist/{core → types/core}/helpers/CoordinateHelper.d.ts +0 -0
  202. /package/dist/{core → types/core}/helpers/CoordinateHelper.test.d.ts +0 -0
  203. /package/dist/{core → types/core}/helpers/InterfaceIdentifierHelper.d.ts +0 -0
  204. /package/dist/{core → types/core}/helpers/InterfaceIdentifierHelper.test.d.ts +0 -0
  205. /package/dist/{core → types/core}/helpers/RelativeValuesHelper.d.ts +0 -0
  206. /package/dist/{core → types/core}/helpers/RelativeValuesHelper.test.d.ts +0 -0
  207. /package/dist/{core → types/core}/module/control/GameControl.d.ts +0 -0
  208. /package/dist/{core → types/core}/module/control/GameControl.test.d.ts +0 -0
  209. /package/dist/{core → types/core}/module/control/GameControlKeyBinding.d.ts +0 -0
  210. /package/dist/{core → types/core}/module/control/GameControlKeyBinding.test.d.ts +0 -0
  211. /package/dist/{core → types/core}/module/grid/GameGrid.d.ts +0 -0
  212. /package/dist/{core → types/core}/module/grid/GameGrid.test.d.ts +0 -0
  213. /package/dist/{core → types/core}/module/grid/GameHudGrid.d.ts +0 -0
  214. /package/dist/{core → types/core}/module/grid/GameHudGrid.test.d.ts +0 -0
  215. /package/dist/{core → types/core}/module/grid/engines/GridAnalysisEngine.d.ts +0 -0
  216. /package/dist/{core → types/core}/module/grid/engines/GridAnalysisEngine.test.d.ts +0 -0
  217. /package/dist/{core → types/core}/module/grid/engines/GridLineEngine.d.ts +0 -0
  218. /package/dist/{core → types/core}/module/grid/engines/GridLineEngine.test.d.ts +0 -0
  219. /package/dist/{core → types/core}/module/grid/engines/GridMovementEngine.d.ts +0 -0
  220. /package/dist/{core → types/core}/module/grid/engines/GridMovementEngine.test.d.ts +0 -0
  221. /package/dist/{core → types/core}/module/grid/engines/GridRegionEngine.d.ts +0 -0
  222. /package/dist/{core → types/core}/module/grid/engines/GridRegionEngine.test.d.ts +0 -0
  223. /package/dist/{core → types/core}/module/grid/engines/GridTransformEngine.d.ts +0 -0
  224. /package/dist/{core → types/core}/module/grid/engines/GridTransformEngine.test.d.ts +0 -0
  225. /package/dist/{core → types/core}/module/renderer/DisplayRenderer.d.ts +0 -0
  226. /package/dist/{core → types/core}/module/renderer/DisplayRenderer.test.d.ts +0 -0
  227. /package/dist/{core → types/core}/module/renderer/GameRenderer.d.ts +0 -0
  228. /package/dist/{core → types/core}/module/renderer/GameRenderer.test.d.ts +0 -0
  229. /package/dist/{core → types/core}/module/renderer/HudRenderer.d.ts +0 -0
  230. /package/dist/{core → types/core}/module/renderer/HudRenderer.test.d.ts +0 -0
  231. /package/dist/{core → types/core}/module/score/GameScore.d.ts +0 -0
  232. /package/dist/{core → types/core}/module/score/GameScore.test.d.ts +0 -0
  233. /package/dist/{core → types/core}/module/session/GameSession.d.ts +0 -0
  234. /package/dist/{core → types/core}/module/session/GameSession.test.d.ts +0 -0
  235. /package/dist/{core → types/core}/module/sound/GameSound.d.ts +0 -0
  236. /package/dist/{core → types/core}/module/sound/GameSound.test.d.ts +0 -0
  237. /package/dist/{core → types/core}/module/state/GameState.d.ts +0 -0
  238. /package/dist/{core → types/core}/module/state/GameState.test.d.ts +0 -0
  239. /package/dist/{core → types/core}/module/text/GameText.d.ts +0 -0
  240. /package/dist/{core → types/core}/module/text/GameText.test.d.ts +0 -0
  241. /package/dist/{core → types/core}/module/time/GameTime.d.ts +0 -0
  242. /package/dist/{core → types/core}/module/time/GameTime.test.d.ts +0 -0
  243. /package/dist/{core → types/core}/types/Interfaces.d.ts +0 -0
  244. /package/dist/{core → types/core}/types/Types.d.ts +0 -0
  245. /package/dist/{core → types/core}/types/enums.d.ts +0 -0
  246. /package/dist/{core → types/core}/types/modules.d.ts +0 -0
  247. /package/dist/{main.d.ts → types/main.d.ts} +0 -0
  248. /package/dist/{menu → types/menu}/GameMenu.d.ts +0 -0
  249. /package/dist/{menu → types/menu}/GameMenu.test.d.ts +0 -0
  250. /package/dist/{menu → types/menu}/GameMenuSingleton.d.ts +0 -0
  251. /package/dist/{menu → types/menu}/GameMenuSingleton.test.d.ts +0 -0
  252. /package/dist/{menu → types/menu}/GameRepository.d.ts +0 -0
  253. /package/dist/{menu → types/menu}/GameRepository.test.d.ts +0 -0
  254. /package/dist/{menu → types/menu}/manager/GameManager.d.ts +0 -0
  255. /package/dist/{menu → types/menu}/manager/GameManager.test.d.ts +0 -0
  256. /package/dist/types/{interfaces.d.ts → types/interfaces.d.ts} +0 -0
  257. /package/dist/{view → types/view}/Debugger.d.ts +0 -0
  258. /package/dist/{view → types/view}/Debugger.test.d.ts +0 -0
  259. /package/dist/{view → types/view}/GameView.d.ts +0 -0
  260. /package/dist/{view → types/view}/GameView.test.d.ts +0 -0
  261. /package/dist/{view → types/view}/SessionModal.d.ts +0 -0
  262. /package/dist/{view → types/view}/SessionModal.test.d.ts +0 -0
  263. /package/dist/{view → types/view}/components/layout/ButtonLayout.d.ts +0 -0
  264. /package/dist/{view → types/view}/components/layout/ButtonLayout.test.d.ts +0 -0
  265. /package/dist/{view → types/view}/components/layout/ContainerLayout.d.ts +0 -0
  266. /package/dist/{view → types/view}/components/layout/ContainerLayout.test.d.ts +0 -0
  267. /package/dist/{view → types/view}/components/layout/FrameLayout.d.ts +0 -0
  268. /package/dist/{view → types/view}/components/layout/FrameLayout.test.d.ts +0 -0
  269. /package/dist/{view → types/view}/components/ui/BigButton.d.ts +0 -0
  270. /package/dist/{view → types/view}/components/ui/BigButton.test.d.ts +0 -0
  271. /package/dist/{view → types/view}/components/ui/Button.d.ts +0 -0
  272. /package/dist/{view → types/view}/components/ui/Button.test.d.ts +0 -0
  273. /package/dist/{view → types/view}/components/ui/Canvas.d.ts +0 -0
  274. /package/dist/{view → types/view}/components/ui/Canvas.test.d.ts +0 -0
  275. /package/dist/{view → types/view}/components/ui/SmallButton.d.ts +0 -0
  276. /package/dist/{view → types/view}/components/ui/SmallButton.test.d.ts +0 -0
  277. /package/dist/{view → types/view}/theme/applyColors.d.ts +0 -0
  278. /package/dist/{view → types/view}/theme/applyColors.test.d.ts +0 -0
  279. /package/dist/{view → types/view}/theme/dimensions.d.ts +0 -0
  280. /package/dist/{view → types/view}/theme/dimensions.test.d.ts +0 -0
@@ -1,31 +0,0 @@
1
- = FontSize Reference
2
- :description: Predefined logic scales for the retro pixelated typography.
3
- :keywords: font, size, typography, display
4
- :toc: left
5
- :toclevels: 3
6
- :sectnums:
7
- :sectlinks:
8
- :icons: font
9
- :source-highlighter: highlight.js
10
- :reproducible:
11
- :experimental:
12
- :idprefix:
13
- :idseparator: -
14
-
15
- Predefined logic scales for the retro pixelated typography.
16
-
17
- == Values
18
-
19
- [cols="1,3"]
20
- |===
21
- |Value |Level
22
- |`EXTRA_SMALL` |Metrics, fine print, or detailed debug data.
23
- |`SMALL` |Secondary labels.
24
- |`MEDIUM` |Standard size for interactive elements and messages.
25
- |`LARGE` |High-visibility status (e.g., "GET READY").
26
- |`EXTRA_LARGE` |Main titles and "GAME OVER" announcements.
27
- |===
28
-
29
- == General Usage
30
-
31
- Set the active font size via `xref:../modules/GameText.adoc[GameText].setTextSize(FontSize.LARGE)`. The engine automatically handles the scaling based on the display resolution.
@@ -1,42 +0,0 @@
1
- = Sound Reference
2
- :description: Maps sound identifiers to their relative asset paths.
3
- :keywords: sound, audio, assets, game-events
4
- :toc: left
5
- :toclevels: 3
6
- :sectnums:
7
- :sectlinks:
8
- :icons: font
9
- :source-highlighter: highlight.js
10
- :reproducible:
11
- :experimental:
12
- :idprefix:
13
- :idseparator: -
14
-
15
- Maps sound identifiers to their relative asset paths.
16
-
17
- == Values
18
-
19
- [cols="1,2"]
20
- |===
21
- |Value |Asset Path
22
- |`SPAWN` |`./sounds/sound_01.wav`
23
- |`SCORE_1` |`./sounds/sound_15.wav`
24
- |`SCORE_2` |`./sounds/sound_03.wav`
25
- |`SCORE_3` |`./sounds/sound_02.wav`
26
- |`KEY_PRESS` |`./sounds/sound_14.wav`
27
- |`ACTION_1` |`./sounds/sound_05.wav`
28
- |`ACTION_2` |`./sounds/sound_13.wav`
29
- |`HIT_1` |`./sounds/sound_06.wav`
30
- |`HIT_2` |`./sounds/sound_08.wav`
31
- |`DODGE` |`./sounds/sound_07.wav`
32
- |`DROP` |`./sounds/sound_11.wav`
33
- |`EXPLOSION` |`./sounds/sound_09.wav`
34
- |`GAME_START` |`./sounds/sound_04.wav`
35
- |`SHOT` |`./sounds/sound_12.wav`
36
- |`START_THEME` |`./sounds/sound_10.wav`
37
- |===
38
-
39
- == General Usage
40
-
41
- Use these constants to trigger audio effects via the `xref:../modules/GameSound.adoc[GameSound]` module.
42
- Example: `modules.sound.play(Sound.EXPLOSION)`.
@@ -1,33 +0,0 @@
1
- = StateProperty Reference
2
- :description: Enumerates all observable and persistent properties of the game system.
3
- :keywords: state, persistence, properties, observability
4
- :toc: left
5
- :toclevels: 3
6
- :sectnums:
7
- :sectlinks:
8
- :icons: font
9
- :source-highlighter: highlight.js
10
- :reproducible:
11
- :experimental:
12
- :idprefix:
13
- :idseparator: -
14
-
15
- Enumerates all observable and persistent properties of the game system.
16
-
17
- == Values
18
-
19
- [cols="1,3"]
20
- |===
21
- |Value |Description
22
- |`ON` |Boolean flag for engine power state.
23
- |`START` |Boolean flag for game session start.
24
- |`PLAYING` |Boolean flag for active gameplay logic.
25
- |`GAME_OVER` |Boolean flag for end-of-game state.
26
- |`COLOR_ENABLED` |Boolean flag for themed rendering.
27
- |`MUTED` |Boolean flag for audio suppression.
28
- |`HIGH_SCORE` |Numeric property for the persistent record.
29
- |===
30
-
31
- == General Usage
32
-
33
- Used identifying which property changed in the `xref:../modules/GameState.adoc[GameState].subscribe()` callback.
@@ -1,37 +0,0 @@
1
- = CellHelper Reference
2
- :description: Static factory methods for creating and initializing Cell objects consistently.
3
- :keywords: cell, factory, grid, helper
4
- :toc: left
5
- :toclevels: 3
6
- :sectnums:
7
- :sectlinks:
8
- :icons: font
9
- :source-highlighter: highlight.js
10
- :reproducible:
11
- :experimental:
12
- :idprefix:
13
- :idseparator: -
14
-
15
- The `CellHelper` provides static factory methods for creating and initializing `Cell` objects consistently.
16
-
17
- == Methods
18
-
19
- === `emptyCell(coordinate: xref:../types/Coordinate.adoc[Coordinate]): xref:../types/Cell.adoc[Cell]`
20
-
21
- Creates a new cell with default "OFF" state values.
22
-
23
- **Parameters**
24
-
25
- [cols="1,1,3"]
26
- |===
27
- |Name |Type |Description
28
- |`coordinate` |xref:../types/Coordinate.adoc[Coordinate] |The `{x, y}` position to assign to the new cell.
29
- |===
30
-
31
- **Returns**
32
-
33
- `Cell` - A cell object with `value: 0` and `xref:../enums/Color.adoc[Color].DEFAULT`.
34
-
35
- **Behavior**
36
-
37
- This is used primarily by `xref:../modules/GameGrid.adoc[GameGrid]` to populate the initial matrix during allocation or when resetting a row/column.
@@ -1,57 +0,0 @@
1
- = ControlInputHandlerHelper Reference
2
- :description: Utilities for normalizing raw hardware keyboard events into abstract ControlKey actions.
3
- :keywords: input, handler, keyboard, normalization, helper
4
- :toc: left
5
- :toclevels: 3
6
- :sectnums:
7
- :sectlinks:
8
- :icons: font
9
- :source-highlighter: highlight.js
10
- :reproducible:
11
- :experimental:
12
- :idprefix:
13
- :idseparator: -
14
-
15
- The `ControlInputHandlerHelper` manages the complexity of input timing, such as identifying the difference between a quick "press" and a sustained "hold".
16
-
17
- == Usage
18
-
19
- This helper is used by the `xref:../modules/GameControl.adoc[GameControl]` module to normalize raw hardware events (like `keydown` and `keyup`) into engine-specific events.
20
-
21
- == Methods
22
-
23
- === `handlePress(key: xref:../enums/ControlKey.adoc[ControlKey]): void`
24
-
25
- Processes a new interaction with a specific key.
26
-
27
- **Parameters**
28
-
29
- [cols="1,1,3"]
30
- |===
31
- |Name |Type |Description
32
- |`key` |xref:../enums/ControlKey.adoc[ControlKey] |The virtual key being interacted with.
33
- |===
34
-
35
- **Behavior**
36
-
37
- 1. Triggers the `xref:../enums/ControlEventType.adoc[PRESSED]` event immediately.
38
- 2. Starts a timer based on `configs.buttonHold.holdDelayMs`.
39
- 3. If the key is still active after the delay, it starts an interval that repeatedly triggers the `xref:../enums/ControlEventType.adoc[HELD]` event.
40
-
41
- '''
42
-
43
- === `handleRelease(key: xref:../enums/ControlKey.adoc[ControlKey]): void`
44
-
45
- Stops tracking an active interaction.
46
-
47
- **Parameters**
48
-
49
- [cols="1,1,3"]
50
- |===
51
- |Name |Type |Description
52
- |`key` |xref:../enums/ControlKey.adoc[ControlKey] |The key that was released.
53
- |===
54
-
55
- **Behavior**
56
-
57
- Clears all active timers (delay and interval) for the specified key to stop `xref:../enums/ControlEventType.adoc[HELD]` events from firing.
@@ -1,118 +0,0 @@
1
- = CoordinateHelper Reference
2
- :description: Specialized math utilities for converting between Grid, Display, and Pixel coordinate systems.
3
- :keywords: coordinates, math, grid, display, conversion, helper
4
- :toc: left
5
- :toclevels: 3
6
- :sectnums:
7
- :sectlinks:
8
- :icons: font
9
- :source-highlighter: highlight.js
10
- :reproducible:
11
- :experimental:
12
- :idprefix:
13
- :idseparator: -
14
-
15
- The `CoordinateHelper` is a static utility class that handles translations between different coordinate systems: the logical xref:../modules/GameGrid.adoc[Game Grid], the normalized Display area, and absolute pixel positions.
16
-
17
- == API Reference
18
-
19
- === `getRelativeCoordinate(p: p5, coordinate: xref:../types/Coordinate.adoc[Coordinate]): xref:../types/Coordinate.adoc[Coordinate]`
20
-
21
- Converts a pixel-based coordinate into a normalized relative coordinate (0.0 to 1.0).
22
-
23
- **Parameters**
24
-
25
- [cols="1,1,3"]
26
- |===
27
- |Name |Type |Description
28
- |`p` |`p5` |The P5.js instance.
29
- |`coordinate` |xref:../types/Coordinate.adoc[Coordinate] |The absolute pixel coordinate.
30
- |===
31
-
32
- **Returns**
33
-
34
- `xref:../types/Coordinate.adoc[Coordinate]` - The normalized `{x, y}` point.
35
-
36
-
37
- '''
38
-
39
- === `getDisplayPosX(p: p5, x: number, displayWidth: number): number`
40
-
41
- Calculates the absolute X pixel position on the main game display.
42
-
43
- **Parameters**
44
-
45
- [cols="1,1,3"]
46
- |===
47
- |Name |Type |Description
48
- |`p` |`p5` |The P5.js instance.
49
- |`x` |`number` |Normalized horizontal position (0.0 to 1.0).
50
- |`displayWidth` |`number` |The total width of the display area.
51
- |===
52
-
53
- **Returns**
54
-
55
- `number` - The absolute horizontal pixel position.
56
-
57
-
58
- '''
59
-
60
- === `getDisplayPosY(p: p5, y: number, displayHeight: number): number`
61
-
62
- Calculates the absolute Y pixel position on the main game display.
63
-
64
- **Parameters**
65
-
66
- [cols="1,1,3"]
67
- |===
68
- |Name |Type |Description
69
- |`p` |`p5` |The P5.js instance.
70
- |`y` |`number` |Normalized vertical position (0.0 to 1.0).
71
- |`displayHeight` |`number` |The total height of the display area.
72
- |===
73
-
74
- **Returns**
75
-
76
- `number` - The absolute vertical pixel position.
77
-
78
-
79
- '''
80
-
81
- === `getHudPosX(p: p5, x: number, displayWidth: number): number`
82
-
83
- Calculates the absolute X pixel position within the HUD area.
84
-
85
- **Parameters**
86
-
87
- [cols="1,1,3"]
88
- |===
89
- |Name |Type |Description
90
- |`p` |`p5` |The P5.js instance.
91
- |`x` |`number` |Normalized horizontal position (0.0 to 1.0) relative to the HUD area.
92
- |`displayWidth` |`number` |The width of the main display (used to calculate the HUD offset).
93
- |===
94
-
95
- **Returns**
96
-
97
- `number` - The absolute horizontal pixel position within the HUD.
98
-
99
-
100
- '''
101
-
102
- === `getHudPosY(p: p5, y: number, displayHeight: number): number`
103
-
104
- Calculates the absolute Y pixel position within the HUD area.
105
-
106
- **Parameters**
107
-
108
- [cols="1,1,3"]
109
- |===
110
- |Name |Type |Description
111
- |`p` |`p5` |The P5.js instance.
112
- |`y` |`number` |Normalized vertical position (0.0 to 1.0) relative to the HUD area.
113
- |`displayHeight` |`number` |The total height of the display area.
114
- |===
115
-
116
- **Returns**
117
-
118
- `number` - The absolute vertical pixel position within the HUD.
@@ -1,53 +0,0 @@
1
- = RelativeValuesHelper Reference
2
- :description: Generic utilities for calculating relative sizes and positions within containers.
3
- :keywords: relative, sizing, positioning, layout, helper
4
- :toc: left
5
- :toclevels: 3
6
- :sectnums:
7
- :sectlinks:
8
- :icons: font
9
- :source-highlighter: highlight.js
10
- :reproducible:
11
- :experimental:
12
- :idprefix:
13
- :idseparator: -
14
-
15
- The `RelativeValuesHelper` provides conversion utilities for scaling absolute sizes to the current canvas dimensions, enabling responsive layouts.
16
-
17
- == Methods
18
-
19
- === `getRelativeWidth(p: p5, size: number): number`
20
-
21
- Calculates a pixel width based on a normalized percentage.
22
-
23
- **Parameters**
24
-
25
- [cols="1,1,3"]
26
- |===
27
- |Name |Type |Description
28
- |`p` |`p5` |The P5.js instance.
29
- |`size` |`number` |A float between 0.0 and 1.0 representing percentage of width.
30
- |===
31
-
32
- **Returns**
33
-
34
- `number` - The calculated absolute pixel width.
35
-
36
- '''
37
-
38
- === `getRelativeHeight(p: p5, size: number): number`
39
-
40
- Calculates a pixel height based on a normalized percentage.
41
-
42
- **Parameters**
43
-
44
- [cols="1,1,3"]
45
- |===
46
- |Name |Type |Description
47
- |`p` |`p5` |The P5.js instance.
48
- |`size` |`number` |A float between 0.0 and 1.0 representing percentage of height.
49
- |===
50
-
51
- **Returns**
52
-
53
- `number` - The calculated absolute pixel height.
@@ -1,29 +0,0 @@
1
- = Debuggable Reference
2
- :description: Contract for modules that provide transparency to the developer.
3
- :keywords: debug, interface, transparency, metrics
4
- :toc: left
5
- :toclevels: 3
6
- :sectnums:
7
- :sectlinks:
8
- :icons: font
9
- :source-highlighter: highlight.js
10
- :reproducible:
11
- :experimental:
12
- :idprefix:
13
- :idseparator: -
14
-
15
- Contract for modules that provide transparency to the developer.
16
-
17
- == Methods
18
-
19
- === `getDebugData(): Record<string, string | number | boolean>`
20
-
21
- Returns a dictionary of internal metrics for real-time inspection.
22
-
23
- **Returns**
24
-
25
- `Record<string, string | number | boolean>` - Key-value pairs of debug information.
26
-
27
- == General Usage
28
-
29
- When implemented, the xref:../modules/Debugger.adoc[Debugger] module will automatically create a UI section for the component and refresh its data every logic tick.
@@ -1,35 +0,0 @@
1
- = GameModules Reference
2
- :description: The central hub providing component-to-component visibility.
3
- :keywords: architecture, dependency-injection, registry, modules
4
- :toc: left
5
- :toclevels: 3
6
- :sectnums:
7
- :sectlinks:
8
- :icons: font
9
- :source-highlighter: highlight.js
10
- :reproducible:
11
- :experimental:
12
- :idprefix:
13
- :idseparator: -
14
-
15
- The central hub providing component-to-component visibility.
16
-
17
- == Properties
18
-
19
- [cols="1,1,3"]
20
- |===
21
- |Name |Type |Description
22
- |`grid` |xref:modules/Grid.adoc[Grid] |Main game field manager.
23
- |`hudGrid` |xref:modules/Grid.adoc[Grid] |Secondary 4x4 grid for HUD elements.
24
- |`state` |xref:modules/State.adoc[State] |Single source of truth for game flags.
25
- |`control` |xref:modules/Control.adoc[Control] |Input handling service.
26
- |`text` |xref:modules/Text.adoc[Text] |Canvas typography service.
27
- |`time` |xref:modules/Time.adoc[Time] |Logical clock manager.
28
- |`sound` |xref:Sound.adoc[Sound] |Audio playback service.
29
- |`score` |xref:modules/Score.adoc[Score] |Session performance tracker.
30
- |`renderer` |xref:modules/RendererComposite.adoc[RendererComposite] |The visual orchestration layer.
31
- |===
32
-
33
- == General Usage
34
-
35
- This registry is passed to almost every lifecycle method (`update`, `render`, `ControlCallback`). It allows modules to interact without tight coupling. For example, the `xref:modules/Sound.adoc[Sound]` module uses it to play sounds via `modules.sound.play()`.
@@ -1,24 +0,0 @@
1
- = Initializable Reference
2
- :description: A fundamental contract for modules that require an assembly phase.
3
- :keywords: lifecycle, initialization, setup, bootstrap
4
- :toc: left
5
- :toclevels: 3
6
- :sectnums:
7
- :sectlinks:
8
- :icons: font
9
- :source-highlighter: highlight.js
10
- :reproducible:
11
- :experimental:
12
- :idprefix:
13
- :idseparator: -
14
-
15
- A fundamental contract for modules that require an assembly phase.
16
-
17
- == Methods
18
-
19
- === `setup(): void`
20
- Invoked once by the engine after all modules are constructed.
21
-
22
- == General Usage
23
-
24
- Modules implementing `Initializable` use the `setup()` phase to establish internal buffers, bind event listeners, or perform calculations that depend on final configuration values.
@@ -1,33 +0,0 @@
1
- = RendererInitializable Reference
2
- :description: Extension of Initializable specifically for rendering components.
3
- :keywords: rendering, initialization, layout, metrics
4
- :toc: left
5
- :toclevels: 3
6
- :sectnums:
7
- :sectlinks:
8
- :icons: font
9
- :source-highlighter: highlight.js
10
- :reproducible:
11
- :experimental:
12
- :idprefix:
13
- :idseparator: -
14
-
15
- Extension of `xref:Initializable.adoc[Initializable]` specifically for rendering components.
16
-
17
- == Methods
18
-
19
- === `setup(rendererMetrics: xref:../types/RendererMetrics.adoc[RendererMetrics]): void`
20
-
21
- Invoked with live geometric metrics for the current session.
22
-
23
- **Parameters**
24
-
25
- [cols="1,1,3"]
26
- |===
27
- |Name |Type |Description
28
- |`rendererMetrics` |`xref:../types/RendererMetrics.adoc[RendererMetrics]` |The calculated display dimensions and offsets.
29
- |===
30
-
31
- == General Usage
32
-
33
- Implemented by components like `xref:../modules/DisplayRenderer.adoc[DisplayRenderer]` to receive pre-calculated X/Y origins and cell sizes before the first frame is drawn.
@@ -1,41 +0,0 @@
1
- = StateSyncable Reference
2
- :description: Contract for modules that must react to global state changes.
3
- :keywords: state, reactivity, synchronization, events
4
- :toc: left
5
- :toclevels: 3
6
- :sectnums:
7
- :sectlinks:
8
- :icons: font
9
- :source-highlighter: highlight.js
10
- :reproducible:
11
- :experimental:
12
- :idprefix:
13
- :idseparator: -
14
-
15
- Contract for modules that must react to global state changes.
16
-
17
- == Properties
18
-
19
- [cols="1,1,3"]
20
- |===
21
- |Name |Type |Description
22
- |`_state` |`State` |Internal reference to the state module.
23
- |===
24
-
25
- == Methods
26
-
27
- === `syncState(state: xref:modules/State.adoc[State]): void`
28
-
29
- Links the module instance and allows it to subscribe to properties.
30
-
31
- **Parameters**
32
-
33
- [cols="1,1,3"]
34
- |===
35
- |Name |Type |Description
36
- |`state` |`xref:modules/State.adoc[State]` |The global state manager.
37
- |===
38
-
39
- == General Usage
40
-
41
- Implemented by `xref:../modules/GameSound.adoc[GameSound]` and `xref:../modules/GameScore.adoc[GameScore]`. During the start-up sequence, the engine calls `syncState()` on these modules to ensure they have the latest references to `muted` flags and `highScore` data.
@@ -1,98 +0,0 @@
1
- = Control Reference
2
- :description: Interface for input handling and event-driven control distribution.
3
- :keywords: control, input, subscription, events
4
- :toc: left
5
- :toclevels: 3
6
- :sectnums:
7
- :sectlinks:
8
- :icons: font
9
- :source-highlighter: highlight.js
10
- :reproducible:
11
- :experimental:
12
- :idprefix:
13
- :idseparator: -
14
-
15
- Interface for input handling and event-driven control distribution.
16
-
17
- == Methods
18
-
19
- === `notify(key: xref:../../enums/ControlKey.adoc[ControlKey], type: xref:../../enums/ControlEventType.adoc[ControlEventType]): void`
20
-
21
- Triggers an event manually. Usually called by hardware drivers (like Keyboard listeners).
22
-
23
- **Parameters**
24
-
25
- [cols="1,1,3"]
26
- |===
27
- |Name |Type |Description
28
- |`key` |`xref:../../enums/ControlKey.adoc[ControlKey]` |The control key to simulate.
29
- |`type` |`xref:../../enums/ControlEventType.adoc[ControlEventType]` |The type of event (press/release).
30
- |===
31
-
32
-
33
- '''
34
-
35
- === `setModules(modules: xref:../GameModules.adoc[GameModules]): void`
36
-
37
- Provides the context registry required for `xref:../../types/GameEvent.adoc[GameEvent]` construction.
38
-
39
- **Parameters**
40
-
41
- [cols="1,1,3"]
42
- |===
43
- |Name |Type |Description
44
- |`modules` |`xref:../GameModules.adoc[GameModules]` |Registry of all game modules.
45
- |===
46
-
47
-
48
- '''
49
-
50
- === `subscribe(key: xref:../../enums/ControlKey.adoc[ControlKey], type: xref:../../enums/ControlEventType.adoc[ControlEventType], callback: xref:../../types/ControlCallback.adoc[ControlCallback]): void`
51
-
52
- Registers a function to be executed when the specified input occurs.
53
-
54
- **Parameters**
55
-
56
- [cols="1,1,3"]
57
- |===
58
- |Name |Type |Description
59
- |`key` |`xref:../../enums/ControlKey.adoc[ControlKey]` |The key to listen for.
60
- |`type` |`xref:../../enums/ControlEventType.adoc[ControlEventType]` |The event type (pressed/held/released).
61
- |`callback` |`xref:../../types/ControlCallback.adoc[ControlCallback]` |Function to execute when triggered.
62
- |===
63
-
64
-
65
- '''
66
-
67
- === `unsubscribe(key: xref:../../enums/ControlKey.adoc[ControlKey], type: xref:../../enums/ControlEventType.adoc[ControlEventType], callback: xref:../../types/ControlCallback.adoc[ControlCallback]): void`
68
-
69
- Detaches a previously registered input listener.
70
-
71
- **Parameters**
72
-
73
- [cols="1,1,3"]
74
- |===
75
- |Name |Type |Description
76
- |`key` |`xref:../../enums/ControlKey.adoc[ControlKey]` |The key to unsubscribe from.
77
- |`type` |`xref:../../enums/ControlEventType.adoc[ControlEventType]` |The event type.
78
- |`callback` |`xref:../../types/ControlCallback.adoc[ControlCallback]` |The specific function to remove.
79
- |===
80
-
81
-
82
- '''
83
-
84
- === `unbindControls(): void`
85
-
86
- Temporarily disables all input listeners.
87
-
88
-
89
- '''
90
-
91
- === `bindControls(): void`
92
-
93
- Re-enables input listeners.
94
-
95
-
96
- == General Usage
97
-
98
- Implemented by `xref:../../modules/GameControl.adoc[GameControl]`. Games use this to react to player movements (`xref:../../enums/ControlKey.adoc[LEFT]`, `xref:../../enums/ControlKey.adoc[RIGHT]`) or actions (`xref:../../enums/ControlKey.adoc[ACTION]`).