From af3661fea084df6e089c2597dc4b311c77f39e4f Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 7 Jun 2011 00:23:00 +0200 Subject: 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 --- src/jrummikub/model/IPlayer.java | 7 +++++++ src/jrummikub/model/Player.java | 5 +++++ 2 files changed, 12 insertions(+) (limited to 'src/jrummikub/model') 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 @@ -12,6 +12,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? * 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 @@ -24,6 +24,11 @@ public class Player implements IPlayer { return hand; } + @Override + public void setHand(IHand hand) { + this.hand = hand; + } + @Override public boolean getLaidOut() { return laidOut; -- cgit v1.2.3