source: advance-wars/src/com/medievaltech/advancewars/Player.java

Last change on this file was 41c11dd, checked in by dportnoy <devnull@…>, 13 years ago

Added cities to the game, moved the map to a new static class, and added incomplete support for capturing cities with soldiers.

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