source: advance-wars/src/com/medievaltech/unit/Player.java@ 511177b

Last change on this file since 511177b was 511177b, checked in by dportnoy <devnull@…>, 13 years ago

Added the player class. Forgot to do this before.

  • Property mode set to 100644
File size: 556 bytes
Line 
1package com.medievaltech.unit;
2
3import java.util.*;
4
5import android.graphics.Paint;
6
7public class Player {
8 private String name;
9 private Paint color;
10 private ArrayList<Unit> units;
11
12 public Player(String name, Paint color) {
13 this.name = name;
14 this.color = color;
15 units = new ArrayList<Unit>();
16 }
17
18 public String getName() {
19 return name;
20 }
21
22 public Paint getColor() {
23 return color;
24 }
25
26 public ArrayList<Unit> getControlledUnits() {
27 return units;
28 }
29
30 public void addUnit(Unit u) {
31 units.add(u);
32 }
33}
Note: See TracBrowser for help on using the repository browser.