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