diff options
author | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-05-24 01:51:56 +0200 |
---|---|---|
committer | Jannis Harder <harder@informatik.uni-luebeck.de> | 2011-05-24 01:51:56 +0200 |
commit | 4a98975b0da4baa4158140ba85f39ffa669ba7a8 (patch) | |
tree | 6fc390ed5b983ac8f7a70fc76967d68a3145e8f4 /mock/jrummikub | |
parent | 92d110995488380778bd378f4297032a325dc385 (diff) | |
download | JRummikub-4a98975b0da4baa4158140ba85f39ffa669ba7a8.tar JRummikub-4a98975b0da4baa4158140ba85f39ffa669ba7a8.zip |
Calculate points on hand
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@264 72836036-5685-4462-b002-a69064685172
Diffstat (limited to 'mock/jrummikub')
-rw-r--r-- | mock/jrummikub/model/MockHand.java | 6 | ||||
-rw-r--r-- | mock/jrummikub/model/MockPlayer.java | 4 | ||||
-rw-r--r-- | mock/jrummikub/model/MockRoundState.java | 14 |
3 files changed, 17 insertions, 7 deletions
diff --git a/mock/jrummikub/model/MockHand.java b/mock/jrummikub/model/MockHand.java index 30bda51..c69ae7b 100644 --- a/mock/jrummikub/model/MockHand.java +++ b/mock/jrummikub/model/MockHand.java @@ -76,4 +76,10 @@ public class MockHand implements IHand { // TODO Auto-generated method stub return 0; } + + @Override + public int getStonePoints() { + // TODO Auto-generated method stub + return 0; + } } diff --git a/mock/jrummikub/model/MockPlayer.java b/mock/jrummikub/model/MockPlayer.java index a7b57b4..19c7014 100644 --- a/mock/jrummikub/model/MockPlayer.java +++ b/mock/jrummikub/model/MockPlayer.java @@ -15,8 +15,8 @@ public class MockPlayer implements IPlayer { * @param playerSettings * the player settings */ - public MockPlayer(PlayerSettings playerSettings) { - hand = new Hand(); + public MockPlayer(PlayerSettings playerSettings, GameSettings gameSettings) { + hand = new Hand(gameSettings); this.playerSettings = playerSettings; laidOut = false; } diff --git a/mock/jrummikub/model/MockRoundState.java b/mock/jrummikub/model/MockRoundState.java index 0341f27..ee483c6 100644 --- a/mock/jrummikub/model/MockRoundState.java +++ b/mock/jrummikub/model/MockRoundState.java @@ -22,15 +22,19 @@ public class MockRoundState implements IRoundState { public GameSettings gameSettings; /** */ public IPlayer lastPlayer; - + /** */ public MockRoundState() { table = new MockTable(); players = new ArrayList<MockPlayer>(); - players.add(new MockPlayer(new PlayerSettings("Player 1", Color.RED))); - players.add(new MockPlayer(new PlayerSettings("Player 2", Color.YELLOW))); - players.add(new MockPlayer(new PlayerSettings("Player 3", Color.GREEN))); - players.add(new MockPlayer(new PlayerSettings("Player 4", Color.BLACK))); + players.add(new MockPlayer(new PlayerSettings("Player 1", Color.RED), + gameSettings)); + players.add(new MockPlayer( + new PlayerSettings("Player 2", Color.YELLOW), gameSettings)); + players.add(new MockPlayer(new PlayerSettings("Player 3", Color.GREEN), + gameSettings)); + players.add(new MockPlayer(new PlayerSettings("Player 4", Color.BLACK), + gameSettings)); activePlayer = 0; gameHeap = new StoneHeap(); gameSettings = new GameSettings(); |