summaryrefslogtreecommitdiff
path: root/ws2015/eip/blaetter/07/H7-1A/de/lmu/tcs/Zelle.java
diff options
context:
space:
mode:
Diffstat (limited to 'ws2015/eip/blaetter/07/H7-1A/de/lmu/tcs/Zelle.java')
-rw-r--r--ws2015/eip/blaetter/07/H7-1A/de/lmu/tcs/Zelle.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/ws2015/eip/blaetter/07/H7-1A/de/lmu/tcs/Zelle.java b/ws2015/eip/blaetter/07/H7-1A/de/lmu/tcs/Zelle.java
new file mode 100644
index 0000000..01ac446
--- /dev/null
+++ b/ws2015/eip/blaetter/07/H7-1A/de/lmu/tcs/Zelle.java
@@ -0,0 +1,35 @@
1package de.lmu.tcs;
2
3/**
4 * Model
5 *
6 * Immutable
7 *
8 * Created by jost on 24.11.15.
9 */
10public class Zelle {
11
12 public final static int TOT=0;
13 public final static int LEBENDIG=1;
14
15 private final Position position;
16 private final int zustand;
17
18 public Zelle(Position position, int zustand) {
19 this.position = position;
20 this.zustand = zustand;
21 }
22
23 public Position getPosition() {
24 return position;
25 }
26
27 public boolean istLebendig() {
28 return zustand==LEBENDIG;
29 }
30
31 public boolean istTot() {
32 return zustand==TOT;
33 }
34
35}