My peeps, I'm working on a draft for some rules. I humbly ask for y'all's opinions. Do you have any interest? Also, what would be the best practices to implement what I'm trying to?
My intention is that new Interface types could be created to allow for more, more interesting interactions. { ------------------------------------------------------------------------ Machine Definitions A Petriplace is an entity defined by a unique name among Petriplaces in the same Petrinet. A Petransition is an entity defined by a unique name among Petransitions in the same Petrinet, along with a Type of either Internal of Interface. A Petrinet is given by a set of Petriplaces, a set of Petransitions, and for every Petriplace and Petransition, an integer (defaulting to zero if unspecified) called the Petriplace's Petrivalence for that Transition. Petokens is a Petriplace integer switch with default value zero. Given a Petrinet, one of the Petransitions is Enabled if for every Petriplace in that Petrinet, its Petrivalence summed with its Petokens switch's value is nonnegative. ------------------------------------------------------------------------ Interface Petransition Types In case a Petransition is an Interface, it also has two other textual attributes: Conditions and Actions. Other rules nonwithstanding, An Interface transition CANNOT be Fired unless its Conditions are met. When Fired, an Interface transition causes its Actions to be performed. The possible Interfaces types are as follows, specified as a Name, additional attributes, its Condition, and its Actions. * Lockerswitcher. A Locker. Whenever. The Locker's owner switch is flipped to the Firing player. ------------------------------------------------------------------------ Machine Entities The Machine Yard is an entity. Machines are assets tracked by the Machinist and ownable by the Machine Yard. Their essential attributes are solely a unique name among Machines. Machinestate is a Machine switch tracked by the Machinist with values over Petrinets, and default value the Petrinet with no Petriplaces and no Petransitions. A Player CAN create a Machine under the possession of the Machineyard by specifying its name, a Petrinet, and paying a fee of 1 BoC. A Player CAN, by announcement, Fire a specified enabled Petransition in a specified Machine. When e does so, that Machine's Machinestate Petriplace's Petokens switch are flipped to their current value summed with their Petrivalence for that Petransition. In a message where e Fires a Petransition, a Player SHOULD also publish the specified Machine's new Machinestate. The Machinist CAN, with no objections, destroy a specified Machine. E SHOULD do so if a Machine hasn't been used for too long. ------------------------------------------------------------------------ Lockers Lockers are assets tracked by the Machinist and ownable by the Machine Yard. Lockerowner is a Locker switch with values on Players or Unassigned (default). Other rules notwithstanding, a Player CAN, by announcement, transfer any liquid asset e owns to a Locker of which e is the Lockerowner, and similarly transfer any assets from such a Locker to any entity that can own that asset. A Locker is empty if it does not own any assets. A Player CAN, by annoucement, flip a Locker's Owner switch to emself if it is Unassigned. A Player CAN, by announcement, flip a Locker's Owner switch to Unassigned if it is emself if it is empty. ------------------------------------------------------------------------ } Specific problematic points: * I really don't know when to use switches and when to directly define attributes. * I can't tell the best way to define the Interfaces (I guess something akin to Birds or Stones, but only for Transitions with a particular Type). -- juan