Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

simplegame
Class SimpleRPRuleProcessor  view SimpleRPRuleProcessor download SimpleRPRuleProcessor.java

java.lang.Object
  extended bysimplegame.SimpleRPRuleProcessor
All Implemented Interfaces:
marauroa.game.RPRuleProcessor

public class SimpleRPRuleProcessor
extends java.lang.Object
implements marauroa.game.RPRuleProcessor


Field Summary
private  SimpleRPZone zone
           
 
Constructor Summary
SimpleRPRuleProcessor()
           
 
Method Summary
 void approvedActions(marauroa.game.RPObject.ID id, marauroa.game.RPActionList actionList)
          Pass the whole list of actions so that it can approve or deny the actions in it.
private  marauroa.game.RPAction.Status challenge(marauroa.game.RPObject.ID id, marauroa.game.RPAction action)
           
private  marauroa.game.RPAction.Status challengeAnswer(marauroa.game.RPObject.ID id, marauroa.game.RPAction action)
           
private  void emptyAllSlots(marauroa.game.RPObject rp_player)
           
private  marauroa.game.RPSlot ensureSlot(marauroa.game.RPObject player, java.lang.String slot_name)
           
 marauroa.game.RPAction.Status execute(marauroa.game.RPObject.ID id, marauroa.game.RPAction action)
          Execute an action in the name of a player.
private  marauroa.game.RPAction.Status getCharacterList(marauroa.game.RPObject.ID id, marauroa.game.RPAction action)
           
private  marauroa.game.RPAction.Status makeMove(marauroa.game.RPObject.ID id, marauroa.game.RPAction action)
           
 void nextTurn()
          Notify it when a new turn happens
 void setContext(marauroa.game.RPZone zone)
          Set the context where the actions are executed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

zone

private SimpleRPZone zone
Constructor Detail

SimpleRPRuleProcessor

public SimpleRPRuleProcessor()
Method Detail

setContext

public void setContext(marauroa.game.RPZone zone)
Description copied from interface: marauroa.game.RPRuleProcessor
Set the context where the actions are executed.

Specified by:
setContext in interface marauroa.game.RPRuleProcessor

approvedActions

public void approvedActions(marauroa.game.RPObject.ID id,
                            marauroa.game.RPActionList actionList)
Description copied from interface: marauroa.game.RPRuleProcessor
Pass the whole list of actions so that it can approve or deny the actions in it.

Specified by:
approvedActions in interface marauroa.game.RPRuleProcessor

execute

public marauroa.game.RPAction.Status execute(marauroa.game.RPObject.ID id,
                                             marauroa.game.RPAction action)
Description copied from interface: marauroa.game.RPRuleProcessor
Execute an action in the name of a player.

Specified by:
execute in interface marauroa.game.RPRuleProcessor

nextTurn

public void nextTurn()
Description copied from interface: marauroa.game.RPRuleProcessor
Notify it when a new turn happens

Specified by:
nextTurn in interface marauroa.game.RPRuleProcessor

getCharacterList

private marauroa.game.RPAction.Status getCharacterList(marauroa.game.RPObject.ID id,
                                                       marauroa.game.RPAction action)
                                                throws java.lang.NumberFormatException,
                                                       marauroa.game.Attributes.AttributeNotFoundException,
                                                       marauroa.game.RPZone.RPObjectNotFoundException

challenge

private marauroa.game.RPAction.Status challenge(marauroa.game.RPObject.ID id,
                                                marauroa.game.RPAction action)
                                         throws java.lang.NumberFormatException,
                                                marauroa.game.Attributes.AttributeNotFoundException,
                                                marauroa.game.RPZone.RPObjectNotFoundException

challengeAnswer

private marauroa.game.RPAction.Status challengeAnswer(marauroa.game.RPObject.ID id,
                                                      marauroa.game.RPAction action)
                                               throws java.lang.NumberFormatException,
                                                      marauroa.game.Attributes.AttributeNotFoundException,
                                                      marauroa.game.RPZone.RPObjectNotFoundException

makeMove

private marauroa.game.RPAction.Status makeMove(marauroa.game.RPObject.ID id,
                                               marauroa.game.RPAction action)
                                        throws java.lang.NumberFormatException,
                                               marauroa.game.Attributes.AttributeNotFoundException,
                                               marauroa.game.RPZone.RPObjectNotFoundException

emptyAllSlots

private void emptyAllSlots(marauroa.game.RPObject rp_player)

ensureSlot

private marauroa.game.RPSlot ensureSlot(marauroa.game.RPObject player,
                                        java.lang.String slot_name)