From b57a2d5090cc1c6460b1ce806713964af9ec60f4 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 9 May 2011 00:33:30 +0200 Subject: Allow calling pickUpStone for nonexistant stones git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@178 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/model/Table.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/jrummikub/model') diff --git a/src/jrummikub/model/Table.java b/src/jrummikub/model/Table.java index a763bef..7787bea 100644 --- a/src/jrummikub/model/Table.java +++ b/src/jrummikub/model/Table.java @@ -28,6 +28,10 @@ public class Table extends StoneTray implements ITable { public Pair pickUpStone(Stone stone) { StoneInfo info = findStoneInfo(stone); + if (info == null) { + return null; + } + return splitSet(info.set, info.setPosition, info.stonePosition); } -- cgit v1.2.3