blob: 2f78a899808ef45972c722349843577713e35098 (
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
|
package ch.asynk.tankontank.game;
import java.util.Collection;
import java.util.LinkedHashSet;
import ch.asynk.tankontank.engine.Tile;
public class HexSet extends LinkedHashSet<Hex>
{
private final Map map;
public HexSet(Map map, int n)
{
super(n);
this.map = map;
}
public void enable(int i, boolean enable)
{
for (Hex hex : this)
map.enableOverlayOn(hex, i, enable);
}
@SuppressWarnings("unchecked")
public Collection<Tile> asTiles()
{
return (Collection) this;
}
}
|