summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/model
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2011-06-07 00:23:00 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2011-06-07 00:23:00 +0200
commitaf3661fea084df6e089c2597dc4b311c77f39e4f (patch)
tree85984ed5b225dfe2d24f602d9074ad2228b7c05e /src/jrummikub/model
parentc59332950be525408da7b2e66687603a68cb560b (diff)
downloadJRummikub-af3661fea084df6e089c2597dc4b311c77f39e4f.tar
JRummikub-af3661fea084df6e089c2597dc4b311c77f39e4f.zip
Always operate on cloned hands in the turn controls
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@380 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'src/jrummikub/model')
-rw-r--r--src/jrummikub/model/IPlayer.java7
-rw-r--r--src/jrummikub/model/Player.java5
2 files changed, 12 insertions, 0 deletions
diff --git a/src/jrummikub/model/IPlayer.java b/src/jrummikub/model/IPlayer.java
index 0545352..03b5da4 100644
--- a/src/jrummikub/model/IPlayer.java
+++ b/src/jrummikub/model/IPlayer.java
@@ -13,6 +13,13 @@ public interface IPlayer {
public IHand getHand();
/**
+ * Set the current hand of the player
+ *
+ * @param hand the new hand
+ */
+ public void setHand(IHand hand);
+
+ /**
* Has the player laid out yet?
*
* @return if the player has laid out
diff --git a/src/jrummikub/model/Player.java b/src/jrummikub/model/Player.java
index 38d2587..6f7885b 100644
--- a/src/jrummikub/model/Player.java
+++ b/src/jrummikub/model/Player.java
@@ -25,6 +25,11 @@ public class Player implements IPlayer {
}
@Override
+ public void setHand(IHand hand) {
+ this.hand = hand;
+ }
+
+ @Override
public boolean getLaidOut() {
return laidOut;
}