1+ /**
2+ * Interface representing a player's movement capabilities and state.
3+ */
14interface Moves {
5+ /** Order of fields in the model */
26 fieldOrder : string [ ] ;
7+ /** Player identifier */
38 player : string ;
9+ /** Number of moves remaining */
410 remaining : number ;
11+ /** Last direction moved */
512 last_direction : Direction ;
13+ /** Whether the player can currently move */
614 can_move : boolean ;
715}
816
17+ /**
18+ * Interface representing available movement directions for a player.
19+ */
920interface DirectionsAvailable {
21+ /** Order of fields in the model */
1022 fieldOrder : string [ ] ;
23+ /** Player identifier */
1124 player : string ;
25+ /** List of available directions */
1226 directions : Direction [ ] ;
1327}
1428
29+ /**
30+ * Interface representing a player's position in the game world.
31+ */
1532interface Position {
33+ /** Order of fields in the model */
1634 fieldOrder : string [ ] ;
35+ /** Player identifier */
1736 player : string ;
37+ /** 2D vector representing position */
1838 vec : Vec2 ;
1939}
2040
41+ /**
42+ * Enum representing possible movement directions.
43+ */
2144enum Direction {
2245 None = "0" ,
2346 Left = "1" ,
@@ -26,11 +49,19 @@ enum Direction {
2649 Down = "4" ,
2750}
2851
52+ /**
53+ * Interface representing a 2D vector.
54+ */
2955interface Vec2 {
56+ /** X coordinate */
3057 x : number ;
58+ /** Y coordinate */
3159 y : number ;
3260}
3361
62+ /**
63+ * Type representing the complete schema of game models.
64+ */
3465type Schema = {
3566 dojo_starter : {
3667 Moves : Moves ;
@@ -39,6 +70,9 @@ type Schema = {
3970 } ;
4071} ;
4172
73+ /**
74+ * Enum representing model identifiers in the format "namespace-modelName".
75+ */
4276enum Models {
4377 Moves = "dojo_starter-Moves" ,
4478 DirectionsAvailable = "dojo_starter-DirectionsAvailable" ,
0 commit comments