blob: e2eea0518c1dc2dc4fc7ab9422e231e0c658ef9f (
plain) (
blame)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.fourisland.fourpuzzle.gamestate.mapview.event;
import com.fourisland.fourpuzzle.Direction;
import com.fourisland.fourpuzzle.Layer;
import com.fourisland.fourpuzzle.gamestate.mapview.Map;
import java.awt.Point;
import java.util.Collections;
import java.util.List;
/**
*
* @author hatkirby
*/
public final class ImmutableEvent
{
final Event ev;
public ImmutableEvent(Event ev)
{
this.ev = ev;
}
public String getLabel()
{
return new String(ev.getLabel());
}
public Point getLocation()
{
return new Point(ev.getLocation());
}
public Direction getDirection()
{
return ev.getDirection();
}
public boolean isMoving()
{
return ev.isMoving();
}
public Layer getLayer()
{
return ev.getLayer();
}
public boolean isOccupyingSpace(int x, int y)
{
return ev.isOccupyingSpace(x, y);
}
public List<Direction> getLegalMoves()
{
return Collections.unmodifiableList(ev.getLegalMoves());
}
public int getAnimationStep()
{
return ev.getAnimationStep();
}
public Map getParentMap()
{
return ev.getParentMap();
}
public MoveSpeed getMoveSpeed()
{
return ev.getMoveSpeed();
}
}
|