Fixed all warnings (comments) but one, one TODO important
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@351 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
f1abd1b564
commit
c3b4eef14c
7 changed files with 75 additions and 18 deletions
|
@ -49,6 +49,9 @@ public class StoneSet implements Iterable<Stone>, Sizeable {
|
|||
/**
|
||||
* Test for rule conflict within the StoneSet
|
||||
*
|
||||
* @param settings
|
||||
* GameSettings
|
||||
*
|
||||
* @return true when the set is valid according to the rules
|
||||
*/
|
||||
public boolean isValid(GameSettings settings) {
|
||||
|
@ -59,6 +62,9 @@ public class StoneSet implements Iterable<Stone>, Sizeable {
|
|||
* Test for rule conflict within the StoneSet and determine whether the set
|
||||
* is a group or a run
|
||||
*
|
||||
* @param settings
|
||||
* GameSettings
|
||||
*
|
||||
* @return GROUP or RUN for valid sets, INVALID otherwise
|
||||
*/
|
||||
|
||||
|
@ -80,7 +86,8 @@ public class StoneSet implements Iterable<Stone>, Sizeable {
|
|||
} else if (stones.size() > settings.getStoneColors().size()) {
|
||||
return new Pair<Type, Integer>(
|
||||
RUN,
|
||||
(settings.getHighestValue() * (settings.getHighestValue() + 1))
|
||||
(settings.getHighestValue() * (settings
|
||||
.getHighestValue() + 1))
|
||||
/ 2
|
||||
- (stones.size() - settings.getHighestValue())
|
||||
* (stones.size() - settings.getHighestValue() - 1)
|
||||
|
|
|
@ -19,6 +19,12 @@ public class Table extends StoneTray<StoneSet> implements ITable {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for a table
|
||||
*
|
||||
* @param settings
|
||||
* GameSettings
|
||||
*/
|
||||
public Table(GameSettings settings) {
|
||||
gameSettings = settings;
|
||||
}
|
||||
|
|
Reference in a new issue