src/main/java/ru/alphatech/icfpc/policy/AbstractPolicy.java
author akhmetovlz
Sat, 18 Jun 2011 19:43:09 +0400
changeset 21 b0748d485790
parent 19 624552552ae7
child 32 04ac70718172
permissions -rw-r--r--
(no commit message)
     1 package ru.alphatech.icfpc.policy;
     2 
     3 import ru.alphatech.icfpc.game.Player;
     4 
     5 public abstract class AbstractPolicy {
     6 
     7 	protected Player player = null;
     8 	
     9 	private int turnCount   = 0;
    10 	private int turnCurrent = 0;
    11 	
    12 	public AbstractPolicy(int turnCount, Player player){
    13 		this.player = player;
    14 		this.turnCount = turnCount;
    15 		this.turnCurrent = 0;
    16 	}
    17 	
    18 	public int getCurrentTurns() {
    19 		return turnCurrent;
    20 	}
    21 	
    22 	public int getTurnsCount(){
    23 		return turnCount;
    24 	}
    25 	
    26 	public boolean next(){
    27 		if( turnCurrent < turnCount ){
    28 			turnCurrent++;
    29 			return true;
    30 		}
    31 		return false;
    32 	}
    33 	
    34 	
    35 }