Package edu.wisc.game.engine
Class Order
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.Vector<Vector<Integer>>
-
- edu.wisc.game.engine.Order
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<Vector<Integer>>
,Collection<Vector<Integer>>
,List<Vector<Integer>>
,RandomAccess
public class Order extends Vector<Vector<Integer>>
An Order object describe a built-in or custom ordering of board cells (positions)- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Order.PositionSelector
Names of built-in (predefined) orders
-
Field Summary
-
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BitSet
findEligibleCells(BitSet onBoard)
In the present board configuration, pieces from which cell(s) would be eligible to be picked right now under this order?String
toString()
-
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, forEach, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
-
-
-
-
Method Detail
-
findEligibleCells
public BitSet findEligibleCells(BitSet onBoard)
In the present board configuration, pieces from which cell(s) would be eligible to be picked right now under this order?- Parameters:
onBoard
- indicates which of the N*N cells are occupied.- Returns:
- a subset of onBoard consisting of the piece(s) "in the head" of this order. (E.g the topmost or rightmost pieces).
-
-