summaryrefslogtreecommitdiffstats
path: root/src/jrummikub/model/StoneSet.java
blob: d949187cab774257051e8cba683c2b7191f67c26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package jrummikub.model;

import java.util.List;

import jrummikub.util.Pair;

/** Class managing {@link Stone}s joined together to form sets */
public class StoneSet {
	private List<Stone> stones;

	public StoneSet(Stone stone) {

	}

	public StoneSet(List<Stone> stones) {

	}

	/** Test for rule conflict within the StoneSet */
	public boolean isValid() {
		return false;

	}

	/**
	 * Splits the StoneSet at a specified {@link Position} and returns two new
	 * Stone Sets
	 * 
	 * @param position
	 *            Splitting {@link Position}
	 */
	public Pair<StoneSet, StoneSet> splitAt(int position) {
		//Exception falls falscher index
		if (position==0||position==stones.size()){
			
		}
		else {
			
		}
		return null;

	}

	/**
	 * Joins StoneSet to another StoneSet and returns the resulting new StoneSet
	 * 
	 * @param other
	 *            StoneSet to be joined to active StoneSet
	 */
	public StoneSet join(StoneSet other) {
		return null;

	}

	public int size() {
		return stones.size();
	}

	public Stone get(int i) {
		return stones.get(i);
	}

}