1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/src/main/java/ru/alphatech/icfpc/policy/AbstractPolicy.java Sat Jun 18 19:46:50 2011 +0400
1.3 @@ -0,0 +1,35 @@
1.4 +package ru.alphatech.icfpc.policy;
1.5 +
1.6 +import ru.alphatech.icfpc.game.Player;
1.7 +
1.8 +public abstract class AbstractPolicy {
1.9 +
1.10 + protected Player player = null;
1.11 +
1.12 + private int turnCount = 0;
1.13 + private int turnCurrent = 0;
1.14 +
1.15 + public AbstractPolicy(int turnCount, Player player){
1.16 + this.player = player;
1.17 + this.turnCount = turnCount;
1.18 + this.turnCurrent = 0;
1.19 + }
1.20 +
1.21 + public int getCurrentTurns() {
1.22 + return turnCurrent;
1.23 + }
1.24 +
1.25 + public int getTurnsCount(){
1.26 + return turnCount;
1.27 + }
1.28 +
1.29 + public boolean next(){
1.30 + if( turnCurrent < turnCount ){
1.31 + turnCurrent++;
1.32 + return true;
1.33 + }
1.34 + return false;
1.35 + }
1.36 +
1.37 +
1.38 +}