From 9a708b9cf70ef3e0fcc298db2a53cecbca808227 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 3 Dec 2015 04:35:46 +0000 Subject: Cleanup --- ws2015/eip/blaetter/07/de/lmu/tcs/Zelle.java | 47 ---------------------------- 1 file changed, 47 deletions(-) delete mode 100644 ws2015/eip/blaetter/07/de/lmu/tcs/Zelle.java (limited to 'ws2015/eip/blaetter/07/de/lmu/tcs/Zelle.java') diff --git a/ws2015/eip/blaetter/07/de/lmu/tcs/Zelle.java b/ws2015/eip/blaetter/07/de/lmu/tcs/Zelle.java deleted file mode 100644 index a7c6ad6..0000000 --- a/ws2015/eip/blaetter/07/de/lmu/tcs/Zelle.java +++ /dev/null @@ -1,47 +0,0 @@ -package de.lmu.tcs; - -/** - * Model - * - * Immutable - * - * Created by jost on 24.11.15. - */ -public class Zelle { - - public final static int TOT=0; - public final static int LEBENDIG=1; - - private final Position position; - private final int zustand; - - public Zelle(Position position, int zustand) { - this.position = position; - this.zustand = zustand; - } - - public Zelle(Zelle old) { - this.position = old.position; - this.zustand = old.zustand; - } - - public Position getPosition() { - return position; - } - - public boolean istLebendig() { - return zustand>=LEBENDIG; - } - - public boolean istTot() { - return zustand==TOT; - } - - public Zelle nachkommen() { - return this.istTot() ? (new Zelle(this)) : (new Zelle(position, zustand + 1)); - } - - public int alter() { - return this.istTot() ? -1 : (this.zustand - 1); - } -} -- cgit v1.2.3