Java Universal Role Playing Engine Version 0.3.9

jurpe.game
Class MagesGuild

java.lang.Object
  extended by jurpe.game.MagesGuild

public class MagesGuild
extends java.lang.Object

This class manages the Mages Guild dialogs


Constructor Summary
MagesGuild(Core system)
          Constructor
 
Method Summary
 java.util.AbstractList<Answer> getCurrentAnswers()
          Get a list of the answers tied to the current question
 java.lang.String getCurrentQuestion()
          Get the current question
 java.lang.String getCurrentUnit()
          Get the current dialog unit
 void initializeGuild()
          Initialized dialogs
 java.lang.String processAnswer(Answer theAnswer, IDialogLogic logic)
          Process the answer given by the character to the current question.
 java.lang.String processAnswerWithLogic(IDialogLogic logic)
          Intelligence behind dialogs code.
 void setCurrentUnit(java.lang.String currentUnit)
          Set the current dialog unit
 java.lang.String setNextUnit(Answer selectedAnswer)
          If the answer has been chosen, a next unit will be set as current, and a key code will be returned to the caller.
 void synchronizeUnit()
          Synchronize the dialog with the last dialog phase taken by the character
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MagesGuild

public MagesGuild(Core system)
Constructor

Parameters:
system - Handle to a Core object
See Also:
Core
Method Detail

initializeGuild

public void initializeGuild()
Initialized dialogs


synchronizeUnit

public void synchronizeUnit()
Synchronize the dialog with the last dialog phase taken by the character


getCurrentUnit

public java.lang.String getCurrentUnit()
Get the current dialog unit

Returns:
the current dialog unit

setCurrentUnit

public void setCurrentUnit(java.lang.String currentUnit)
Set the current dialog unit

Parameters:
currentUnit - the current dialog unit

getCurrentQuestion

public java.lang.String getCurrentQuestion()
Get the current question

Returns:
the current question

getCurrentAnswers

public java.util.AbstractList<Answer> getCurrentAnswers()
Get a list of the answers tied to the current question

Returns:
a list of the answers tied to the current question

setNextUnit

public java.lang.String setNextUnit(Answer selectedAnswer)
If the answer has been chosen, a next unit will be set as current, and a key code will be returned to the caller.

Parameters:
selectedAnswer -
Returns:
the next unit code

processAnswer

public java.lang.String processAnswer(Answer theAnswer,
                                      IDialogLogic logic)
Process the answer given by the character to the current question. It returns the code of the next dialog unit

Parameters:
theAnswer - Answer answered
logic - The logic that governs the choice of the next question
Returns:
the code of the next dialog unit.

processAnswerWithLogic

public java.lang.String processAnswerWithLogic(IDialogLogic logic)
Intelligence behind dialogs code. If the gotoCode of the answer is "LOGIC", then this method is called to determine the next unit.

Parameters:
unitCode -
Returns:
next dialog unit code

Java Universal Role Playing Engine Version 0.3.9

Copyright ? 2010 http://jurpe.sourceforge.net/ All Rights Reserved.