Skip to content

Instantly share code, notes, and snippets.

@RoxDevvv
Created July 23, 2020 03:36
Show Gist options
  • Save RoxDevvv/c26c69028ecfcf9de8d1cb119a813705 to your computer and use it in GitHub Desktop.
Save RoxDevvv/c26c69028ecfcf9de8d1cb119a813705 to your computer and use it in GitHub Desktop.
class Player extends Schema { }
schema.defineTypes(Player, {
UUID: "string",
PAWNS: "string",
PicUrl: "string",
NickName: "string",
});
class board extends Schema {
}
schema.defineTypes(board, {
PawnID: "string",
Safe: "boolean",
StartPoint: "string",
});
class plusboard extends Schema {
}
schema.defineTypes(plusboard, {
PID: "string",
PawnID: "string"
});
class LudoStates extends Schema {
constructor() {
super();
this.players = new MapSchema();
this.Board = new ArraySchema();
this.PlusBoard = new ArraySchema();
}
}
//init
schema.defineTypes(LudoStates, {
players: { map: Player },
Board: [board],
PlusBoard: [plusboard],
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment