Allow calling pickUpStone for nonexistant stones
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@178 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
ec2936a034
commit
b57a2d5090
2 changed files with 19 additions and 9 deletions
|
@ -28,6 +28,10 @@ public class Table extends StoneTray<StoneSet> implements ITable {
|
|||
public Pair<StoneSet, StoneSet> pickUpStone(Stone stone) {
|
||||
StoneInfo info = findStoneInfo(stone);
|
||||
|
||||
if (info == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return splitSet(info.set, info.setPosition, info.stonePosition);
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue