39 lines
790 B
Java
39 lines
790 B
Java
import java.util.ArrayList;
|
|
|
|
import Player;
|
|
|
|
public class Field {
|
|
private int dice_number;
|
|
private ArrayList<Field> neighbours;
|
|
private Player owner;
|
|
|
|
public Field(int input_dice_number, Player input_owner){
|
|
neighbours = new ArrayList<Field>();
|
|
dice_number = input_dice_number;
|
|
owner = input_owner;
|
|
}
|
|
|
|
public ArrayList<Field> get_neighbours(){
|
|
return neighbours;
|
|
}
|
|
|
|
public void add_neighbour(Field input){
|
|
neighbours.add(input);
|
|
}
|
|
|
|
public int get_dice_number(){
|
|
return dice_number;
|
|
}
|
|
|
|
public void set_dice_number(int number){
|
|
dice_number = number;
|
|
}
|
|
|
|
public Player get_owner(){
|
|
return owner;
|
|
}
|
|
|
|
public void set_owner(Player input){
|
|
owner = input;
|
|
}
|
|
} |