blob: 38eb57b40daa12a91f690f53b78bb187eb1b6383 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
Board
- build possible assits List<Pawn / GridPoint2>
- support different Tiles layout
Board.Orientation offset
inverted even/odd row scheme
Tile
- automatic overlays to show unit stack depth
Pawn
- public abstract boolean isUnit(); => unit stack depth
Maybe ???
might think about decorator pattern for overlays
us decorator pattern, No can Do ??
+ interface Pawn
+ !!! abstract class SimplePawn implements Pawn
protected Image OR extends Image
+ abstract class PawnDecorator implements Pawn
potected Pawn pawn;
PawnDecorator(Pawn pawn) { this.pawn = pawn; }
public _method_() { pawn._method_(); }
+ ?! abstract class OverlayPawnDecorator extends PawnDecorator
...
+ ?! abstract class HeadedPawnDecorator extends PawnDecorator
...
* class Unit extends SimplePawn
getUnit(_args_) {
return new HeadedPawnDecorator( new OverlayPawnDecorator ( new Unit(_args_) ) )
}
|