src/main/java/ru/alphatech/icfpc/game/Player.java
changeset 36 5b57bc39cc92
parent 30 2579b2cd9446
child 43 4ba83edc4361
     1.1 --- a/src/main/java/ru/alphatech/icfpc/game/Player.java	Sun Jun 19 12:12:55 2011 +0400
     1.2 +++ b/src/main/java/ru/alphatech/icfpc/game/Player.java	Sun Jun 19 12:13:34 2011 +0400
     1.3 @@ -1,13 +1,35 @@
     1.4  package ru.alphatech.icfpc.game;
     1.5  
     1.6 +import ru.alphatech.icfpc.cards.I;
     1.7 +
     1.8  import ru.alphatech.icfpc.cards.ICard;
     1.9  
    1.10  
    1.11  public class Player
    1.12  {
    1.13 +	private Slot[] slots = new Slot[256];
    1.14 +	int registers[] = new int[4];
    1.15 +	
    1.16 +	public Player()
    1.17 +    {
    1.18 +		for(int i = 0; i < 255; i++)
    1.19 +		{
    1.20 +			slots[i].setVitality(10000);
    1.21 +			slots[i].putValue(new I());
    1.22 +		}
    1.23 +		registers[0] = 0;
    1.24 +		registers[1] = 1;
    1.25 +		registers[2] = 2;
    1.26 +		registers[3] = 3;
    1.27 +    }
    1.28 +	
    1.29  	public Slot getSlot(int i)
    1.30  	{
    1.31 -		throw new RuntimeException("Not impilemented yet.");
    1.32 +		return slots[i];
    1.33 +	}
    1.34 +	
    1.35 +	public Slot getRegisterByIndex(int registerIdex){
    1.36 +		return getSlot( registers[registerIdex] );
    1.37  	}
    1.38  	
    1.39  	public void applyCardToSlot(ICard card, Slot slot){
    1.40 @@ -21,4 +43,6 @@
    1.41  	public PlayerStatistic getStatistic(){
    1.42  		throw new RuntimeException("Not impilemented yet.");
    1.43  	}
    1.44 +	
    1.45 +	
    1.46  }