akhmetovlz@19: package ru.alphatech.icfpc.policy; akhmetovlz@19: akhmetovlz@19: import ru.alphatech.icfpc.game.Player; akhmetovlz@19: akhmetovlz@19: public abstract class AbstractPolicy { akhmetovlz@19: akhmetovlz@19: protected Player player = null; akhmetovlz@19: akhmetovlz@19: private int turnCount = 0; akhmetovlz@19: private int turnCurrent = 0; akhmetovlz@19: akhmetovlz@19: public AbstractPolicy(int turnCount, Player player){ akhmetovlz@19: this.player = player; akhmetovlz@19: this.turnCount = turnCount; akhmetovlz@19: this.turnCurrent = 0; akhmetovlz@19: } akhmetovlz@19: akhmetovlz@19: public int getCurrentTurns() { akhmetovlz@19: return turnCurrent; akhmetovlz@19: } akhmetovlz@19: akhmetovlz@19: public int getTurnsCount(){ akhmetovlz@19: return turnCount; akhmetovlz@19: } akhmetovlz@19: akhmetovlz@19: public boolean next(){ akhmetovlz@19: if( turnCurrent < turnCount ){ akhmetovlz@19: turnCurrent++; akhmetovlz@19: return true; akhmetovlz@19: } akhmetovlz@19: return false; akhmetovlz@19: } akhmetovlz@19: akhmetovlz@19: akhmetovlz@19: }