Last change
on this file since 4666fae 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
|
Rev | Line | |
---|
[41c11dd] | 1 | package com.medievaltech.advancewars;
|
---|
[511177b] | 2 |
|
---|
| 3 | import java.util.*;
|
---|
| 4 |
|
---|
[41c11dd] | 5 | import com.medievaltech.unit.Unit;
|
---|
| 6 |
|
---|
[511177b] | 7 | import android.graphics.Paint;
|
---|
| 8 |
|
---|
| 9 | public class Player {
|
---|
| 10 | private String name;
|
---|
| 11 | private Paint color;
|
---|
| 12 | private ArrayList<Unit> units;
|
---|
[41c11dd] | 13 | public static Paint neutralColor;
|
---|
[511177b] | 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.