Android Open Source - BoardGameDirector Turn






From Project

Back to project page BoardGameDirector.

License

The source code is released under:

GNU General Public License

If you think the Android project BoardGameDirector listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.dilph.bgd.engine;
//  w  w  w . jav a 2 s  .  co  m
/**
 * Created with IntelliJ IDEA.
 * User: pseudo
 * Date: 8/3/13
 * Time: 11:09 AM
 * To change this template use File | Settings | File Templates.
 */

/**
 * Represents a turn. Each player has a turn.
 */
public class Turn {


    private final TurnEvent initialTurnEvent;
    TurnEvent currentTurnEvent;

    public Turn(TurnEvent turnEvent) {
        initialTurnEvent = currentTurnEvent = turnEvent;
    }
    

    public TurnEvent getCurrentTurnEvent() {
        return currentTurnEvent;
    }

    public void start() {
        //To change body of created methods use File | Settings | File Templates.
    }

    public void next(boolean response) {
        currentTurnEvent = (currentTurnEvent).getNext(response);


    }

    /**
     * Resets the turn to the initialturnEvent
     */
    public void reset() {
           currentTurnEvent = initialTurnEvent;
           CounterManager.getInstance().resetTurnCounters();
    }
}




Java Source Code List

com.dilph.bgd.engine.BaseEvent.java
com.dilph.bgd.engine.CounterAction.java
com.dilph.bgd.engine.CounterCondition.java
com.dilph.bgd.engine.CounterManager.java
com.dilph.bgd.engine.Counter.java
com.dilph.bgd.engine.Decision.java
com.dilph.bgd.engine.EndTurnEvent.java
com.dilph.bgd.engine.GameAction.java
com.dilph.bgd.engine.GameManager.java
com.dilph.bgd.engine.Player.java
com.dilph.bgd.engine.TurnEvent.java
com.dilph.bgd.engine.Turn.java
com.dilph.bgd.front.BoardGameDirector.java
com.dilph.bgd.front.MainMenu.java
com.dilph.bgd.front.PlayerManagement.java