|
|
| Line 293: |
Line 293: |
|
|
|
|
|
Whatever action we choose in GameManager they are Write actions, as the modify the state of the PlayerContainer, but in RP we have two parts, one that build the perceptions that is read only and one that removes idle players that is write, so we must apply two different locks there. |
|
Whatever action we choose in GameManager they are Write actions, as the modify the state of the PlayerContainer, but in RP we have two parts, one that build the perceptions that is read only and one that removes idle players that is write, so we must apply two different locks there. |
|
|
|
|
⚫ |
|
|
⚫ |
The goal of RP Manager is to handle the whole RP game. This means mainly: |
|
⚫ |
* run RPActions from clients |
|
⚫ |
|
|
⚫ |
* control triggers for events |
|
⚫ |
|
|
|
|
|
⚫ |
As you see this is a HUGE class that is complex. So the idea is to split this behavior into smaller subclasses. |
|
|
|
|
⚫ |
RPManager provides a simple interface to the GameManager for using it: |
|
⚫ |
|
|
⚫ |
|
|
⚫ |
|
|
⚫ |
|
|
|
|
|
⚫ |
addRPAction simply queues an action for that player to be executed on the next turn. |
|
|
|
|
⚫ |
addRPObject, removeRPObject and hasRPObject is a interface to manage RPWorld. |
|
|
|
|
⚫ |
The main outline of RPManager could be: |
|
⚫ |
|
|
⚫ |
|
|
⚫ |
|
|
⚫ |
Procced through every action in this turn |
|
⚫ |
|
|
⚫ |
|
|
|
|
|
⚫ |
Wait for Turn completion. |
|
⚫ |
|
|
⚫ |
|
|
⚫ |
|
|
|
|
|
⚫ |
RPScheduler is the class that handles actions to be queued for each player. All the complexity of Action management should be handled here. |
|
|
|
|
⚫ |
RuleProcessor is a wrapper class for hide actions code. All the actions code MUST be here, this class also acts as a Action code loader, as some actions are not part of Marauroa, but scripts. |
|
|
|
|
|
|
|
|
=Actions and Objects= |
|
=Actions and Objects= |
| Line 362: |
Line 399: |
|
|
|
|
|
See Actions reply in Objects document to know exactly what is returned, but keep in mind that it depends of each particular game. |
|
See Actions reply in Objects document to know exactly what is returned, but keep in mind that it depends of each particular game. |
|
|
|
| ⚫ |
|
|
| ⚫ |
The goal of RP Manager is to handle the whole RP game. This means mainly: |
|
| ⚫ |
* run RPActions from clients |
|
| ⚫ |
|
|
| ⚫ |
* control triggers for events |
|
| ⚫ |
|
|
|
|
|
| ⚫ |
As you see this is a HUGE class that is complex. So the idea is to split this behavior into smaller subclasses. |
|
|
|
|
| ⚫ |
RPManager provides a simple interface to the GameManager for using it: |
|
| ⚫ |
|
|
| ⚫ |
|
|
| ⚫ |
|
|
| ⚫ |
|
|
|
|
|
| ⚫ |
addRPAction simply queues an action for that player to be executed on the next turn. |
|
|
|
|
| ⚫ |
addRPObject, removeRPObject and hasRPObject is a interface to manage RPWorld. |
|
|
|
|
| ⚫ |
The main outline of RPManager could be: |
|
| ⚫ |
|
|
| ⚫ |
|
|
| ⚫ |
|
|
| ⚫ |
Procced through every action in this turn |
|
| ⚫ |
|
|
| ⚫ |
|
|
|
|
|
| ⚫ |
Wait for Turn completion. |
|
| ⚫ |
|
|
| ⚫ |
|
|
| ⚫ |
|
|
|
|
|
| ⚫ |
RPScheduler is the class that handles actions to be queued for each player. All the complexity of Action management should be handled here. |
|
|
|
|
| ⚫ |
RuleProcessor is a wrapper class for hide actions code. All the actions code MUST be here, this class also acts as a Action code loader, as some actions are not part of Marauroa, but scripts. |
|
|
|
|
|
|
|
|
|
=Delta perception Algorithm= |
|
=Delta perception Algorithm= |