Skip to content

Commit

Permalink
[model/events.xsd] updated based on new findings
Browse files Browse the repository at this point in the history
Did some thinking, and this is what I came up with:

- PlayerInvited should really be called "InvitationMade". In analogy
  with method calls, the events should refer to the thing where the state
  changes. An invitation is affected by this event; players aren't.

- We do need an InvitationAccepted event, despite what we previously
  thought. We need it because we need something to invalidate the
  invitation for further AcceptInvitation commands, and only an event
  will do that.
  • Loading branch information
Carl Masak committed Apr 25, 2011
1 parent 726e035 commit 90b1a83
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions model/events.xsd
Expand Up @@ -23,7 +23,7 @@
</xs:complexType>
</xs:element>

<xs:element name="PlayerInvitedEvent">
<xs:element name="InvitationMadeEvent">
<xs:complexType>
<xs:all>
<xs:element name="InvitationID" type="xs:int" />
Expand All @@ -36,26 +36,34 @@
</xs:complexType>
</xs:element>

<xs:element name="GameStartedEvent">
<xs:element name="InvitationRejectedEvent">
<xs:complexType>
<xs:all>
<xs:element name="GameID" type="xs:int" />
<xs:element name="FirstPlayerHandle" type="xs:string" />
<xs:element name="SecondPlayerHandle" type="xs:string" />
<xs:element name="Size" type="xs:int" />
<xs:element name="PlayerTimeLimit" type="xs:duration" />
<xs:element name="InvitationID" type="xs:int" />
</xs:all>
</xs:complexType>
</xs:element>

<xs:element name="InvitationRejectedEvent">
<xs:element name="InvitationAcceptedEvent">
<xs:complexType>
<xs:all>
<xs:element name="InvitationID" type="xs:int" />
</xs:all>
</xs:complexType>
</xs:element>

<xs:element name="GameStartedEvent">
<xs:complexType>
<xs:all>
<xs:element name="GameID" type="xs:int" />
<xs:element name="FirstPlayerHandle" type="xs:string" />
<xs:element name="SecondPlayerHandle" type="xs:string" />
<xs:element name="Size" type="xs:int" />
<xs:element name="PlayerTimeLimit" type="xs:duration" />
</xs:all>
</xs:complexType>
</xs:element>

<xs:element name="StonePlacedEvent">
<xs:complexType>
<xs:all>
Expand Down

0 comments on commit 90b1a83

Please sign in to comment.