Source code: marauroa/game/RPRuleProcessor.java
1 /* $Id: RPRuleProcessor.java,v 1.9 2003/12/12 15:57:11 arianne_rpg Exp $ */
2 /***************************************************************************
3 * (C) Copyright 2003 - Marauroa *
4 ***************************************************************************
5 ***************************************************************************
6 * *
7 * This program is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation; either version 2 of the License, or *
10 * (at your option) any later version. *
11 * *
12 ***************************************************************************/
13 package marauroa.game;
14
15 /** Interface for the class that is in charge of executing actions.
16 * Implement it to personalize the game */
17 public interface RPRuleProcessor
18 {
19 /** Set the context where the actions are executed.
20 * @param zone The zone where actions happens. */
21 public void setContext(RPZone zone);
22 /** Pass the whole list of actions so that it can approve or deny the actions in it.
23 * @param id the id of the object owner of the actions.
24 * @param actionList the list of actions that the player wants to execute. */
25 public void approvedActions(RPObject.ID id, RPActionList actionList);
26 /** Execute an action in the name of a player.
27 * @param id the id of the object owner of the actions.
28 * @param action the action to execute
29 * @returns the action status, that can be Success, Fail or incomplete, please
30 * refer to Actions Explained for more info. */
31 public RPAction.Status execute(RPObject.ID id, RPAction action);
32 /** Notify it when a new turn happens */
33 public void nextTurn();
34 }