Skip to content

Instantly share code, notes, and snippets.

@jt-nti
Created March 17, 2017 22:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jt-nti/7a35323502bd62332d751216c33e0817 to your computer and use it in GitHub Desktop.
Save jt-nti/7a35323502bd62332d751216c33e0817 to your computer and use it in GitHub Desktop.
Fabric Composer based game model
/**
* Defines a data model for a multi-player game
*/
namespace org.example.game
enum ItemType {
o POTION
o WEAPON
}
asset Item identified by itemId {
o String itemId
o String name
o ItemType type
--> Player owner optional
}
asset Trophy identified by trophyId {
o String trophyId
o String name
--> Player owner optional
}
asset Game identified by gameId {
o String gameId
o Player[] players
--> Trophy prize
}
participant Player identified by characterName {
o String characterName
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment