equal
deleted
inserted
replaced
|
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 } |