diff options
Diffstat (limited to 'doc/jrummikub/model/StoneTray.html')
-rw-r--r-- | doc/jrummikub/model/StoneTray.html | 258 |
1 files changed, 255 insertions, 3 deletions
diff --git a/doc/jrummikub/model/StoneTray.html b/doc/jrummikub/model/StoneTray.html index 60468cb..f5e457c 100644 --- a/doc/jrummikub/model/StoneTray.html +++ b/doc/jrummikub/model/StoneTray.html @@ -2,12 +2,12 @@ <!--NewPage--> <HTML> <HEAD> -<!-- Generated by javadoc (build 1.6.0_22) on Tue May 10 17:04:58 CEST 2011 --> +<!-- Generated by javadoc (build 1.6.0_22) on Tue Jul 05 21:51:55 CEST 2011 --> <TITLE> StoneTray </TITLE> -<META NAME="date" CONTENT="2011-05-10"> +<META NAME="date" CONTENT="2011-07-05"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"> @@ -98,7 +98,7 @@ java.lang.Object <DL> <DT><DT><B>Type Parameters:</B><DD><CODE>E</CODE> - Type of positioned objects (must implement Sizeable)</DL> <DL> -<DT><B>All Implemented Interfaces:</B> <DD>java.lang.Cloneable, java.lang.Iterable<<A HREF="../../jrummikub/util/Pair.html" title="class in jrummikub.util">Pair</A><E,<A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A>>>, <A HREF="../../jrummikub/model/IStoneTray.html" title="interface in jrummikub.model">IStoneTray</A><E></DD> +<DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<<A HREF="../../jrummikub/util/Pair.html" title="class in jrummikub.util">Pair</A><E,<A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A>>>, <A HREF="../../jrummikub/model/IStoneTray.html" title="interface in jrummikub.model">IStoneTray</A><E></DD> </DL> <DL> <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../jrummikub/model/Hand.html" title="class in jrummikub.model">Hand</A>, <A HREF="../../jrummikub/model/Table.html" title="class in jrummikub.model">Table</A></DD> @@ -114,6 +114,8 @@ A StoneTray is a collection of positioned objects (for example <A HREF="../../jr <P> <P> +<DL> +<DT><B>See Also:</B><DD><A HREF="../../serialized-form.html#jrummikub.model.StoneTray">Serialized Form</A></DL> <HR> <P> @@ -150,6 +152,14 @@ A StoneTray is a collection of positioned objects (for example <A HREF="../../jr <BR> </TD> </TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>private static long</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../jrummikub/model/StoneTray.html#serialVersionUID">serialVersionUID</A></B></CODE> + +<BR> + </TD> +</TR> </TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --> @@ -186,6 +196,14 @@ A StoneTray is a collection of positioned objects (for example <A HREF="../../jr </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE> boolean</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../jrummikub/model/StoneTray.html#contains(E)">contains</A></B>(<A HREF="../../jrummikub/model/StoneTray.html" title="type parameter in StoneTray">E</A> object)</CODE> + +<BR> + Search for an object within the stone tray</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../jrummikub/model/StoneTray.html#drop(E, jrummikub.model.Position)">drop</A></B>(<A HREF="../../jrummikub/model/StoneTray.html" title="type parameter in StoneTray">E</A> object, <A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A> position)</CODE> @@ -195,6 +213,27 @@ A StoneTray is a collection of positioned objects (for example <A HREF="../../jr </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>private void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../jrummikub/model/StoneTray.html#drop(E, jrummikub.model.Position, jrummikub.model.StoneTray.Direction)">drop</A></B>(<A HREF="../../jrummikub/model/StoneTray.html" title="type parameter in StoneTray">E</A> object, + <A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A> position, + <A HREF="../../jrummikub/model/StoneTray.Direction.html" title="enum in jrummikub.model">StoneTray.Direction</A> direction)</CODE> + +<BR> + Subroutine to "drop" to consider and determine the direction the objects + dropped one collides with position-wise evade in</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>private void</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../jrummikub/model/StoneTray.html#dropUnchecked(E, jrummikub.model.Position, jrummikub.model.StoneTray.Direction)">dropUnchecked</A></B>(<A HREF="../../jrummikub/model/StoneTray.html" title="type parameter in StoneTray">E</A> object, + <A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A> position, + <A HREF="../../jrummikub/model/StoneTray.Direction.html" title="enum in jrummikub.model">StoneTray.Direction</A> direction)</CODE> + +<BR> + Subroutine to "drop" to execute the actual drop</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected <A HREF="../../jrummikub/util/Pair.html" title="class in jrummikub.util">Pair</A><<A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A>,<A HREF="../../jrummikub/model/StoneTray.Direction.html" title="enum in jrummikub.model">StoneTray.Direction</A>></CODE></FONT></TD> <TD><CODE><B><A HREF="../../jrummikub/model/StoneTray.html#fixInvalidDrop(E, jrummikub.model.Position, jrummikub.model.StoneTray.Direction)">fixInvalidDrop</A></B>(<A HREF="../../jrummikub/model/StoneTray.html" title="type parameter in StoneTray">E</A> object, <A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A> pos, @@ -206,6 +245,38 @@ A StoneTray is a collection of positioned objects (for example <A HREF="../../jr </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>private <A HREF="../../jrummikub/model/StoneTray.Direction.html" title="enum in jrummikub.model">StoneTray.Direction</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../jrummikub/model/StoneTray.html#getMoveDirection(E, jrummikub.model.Position, jrummikub.util.Pair)">getMoveDirection</A></B>(<A HREF="../../jrummikub/model/StoneTray.html" title="type parameter in StoneTray">E</A> object, + <A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A> position, + <A HREF="../../jrummikub/util/Pair.html" title="class in jrummikub.util">Pair</A><<A HREF="../../jrummikub/model/StoneTray.html" title="type parameter in StoneTray">E</A>,<A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A>> blocking)</CODE> + +<BR> + Returns the direction to move the object in</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>private boolean</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../jrummikub/model/StoneTray.html#getMoveOrientation(E, jrummikub.model.Position, jrummikub.util.Pair)">getMoveOrientation</A></B>(<A HREF="../../jrummikub/model/StoneTray.html" title="type parameter in StoneTray">E</A> object, + <A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A> position, + <A HREF="../../jrummikub/util/Pair.html" title="class in jrummikub.util">Pair</A><<A HREF="../../jrummikub/model/StoneTray.html" title="type parameter in StoneTray">E</A>,<A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A>> blocking)</CODE> + +<BR> + Will the object be moved horizontally or vertically</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>private <A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A></CODE></FONT></TD> +<TD><CODE><B><A HREF="../../jrummikub/model/StoneTray.html#getNewPosition(E, jrummikub.model.Position, jrummikub.model.StoneTray.Direction, E, jrummikub.model.Position)">getNewPosition</A></B>(<A HREF="../../jrummikub/model/StoneTray.html" title="type parameter in StoneTray">E</A> object, + <A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A> position, + <A HREF="../../jrummikub/model/StoneTray.Direction.html" title="enum in jrummikub.model">StoneTray.Direction</A> newDirection, + <A HREF="../../jrummikub/model/StoneTray.html" title="type parameter in StoneTray">E</A> currentObject, + <A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A> currentPosition)</CODE> + +<BR> + </TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../jrummikub/model/StoneTray.html#getPosition(E)">getPosition</A></B>(<A HREF="../../jrummikub/model/StoneTray.html" title="type parameter in StoneTray">E</A> object)</CODE> @@ -230,6 +301,27 @@ A StoneTray is a collection of positioned objects (for example <A HREF="../../jr </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>private static boolean</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../jrummikub/model/StoneTray.html#lessOrEqual(double, double)">lessOrEqual</A></B>(double d, + double e)</CODE> + +<BR> + Static method for determining a less or equal relation considering a + small fuzziness</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> +<CODE>private boolean</CODE></FONT></TD> +<TD><CODE><B><A HREF="../../jrummikub/model/StoneTray.html#objectsOverlap(E, jrummikub.model.Position, E, jrummikub.model.Position)">objectsOverlap</A></B>(<A HREF="../../jrummikub/model/StoneTray.html" title="type parameter in StoneTray">E</A> object1, + <A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A> position1, + <A HREF="../../jrummikub/model/StoneTray.html" title="type parameter in StoneTray">E</A> object2, + <A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A> position2)</CODE> + +<BR> + Tests whether two objects overlap</TD> +</TR> +<TR BGCOLOR="white" CLASS="TableRowColor"> +<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../jrummikub/model/StoneTray.html#pickUp(E)">pickUp</A></B>(<A HREF="../../jrummikub/model/StoneTray.html" title="type parameter in StoneTray">E</A> object)</CODE> @@ -259,6 +351,16 @@ A StoneTray is a collection of positioned objects (for example <A HREF="../../jr </TR> </TABLE> +<A NAME="serialVersionUID"><!-- --></A><H3> +serialVersionUID</H3> +<PRE> +private static final long <B>serialVersionUID</B></PRE> +<DL> +<DL> +<DT><B>See Also:</B><DD><A HREF="../../constant-values.html#jrummikub.model.StoneTray.serialVersionUID">Constant Field Values</A></DL> +</DL> +<HR> + <A NAME="objects"><!-- --></A><H3> objects</H3> <PRE> @@ -313,6 +415,61 @@ public void <B>drop</B>(<A HREF="../../jrummikub/model/StoneTray.html" title="ty </DL> <HR> +<A NAME="drop(jrummikub.model.Sizeable,jrummikub.model.Position,jrummikub.model.StoneTray.Direction)"><!-- --></A><A NAME="drop(E, jrummikub.model.Position, jrummikub.model.StoneTray.Direction)"><!-- --></A><H3> +drop</H3> +<PRE> +private void <B>drop</B>(<A HREF="../../jrummikub/model/StoneTray.html" title="type parameter in StoneTray">E</A> object, + <A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A> position, + <A HREF="../../jrummikub/model/StoneTray.Direction.html" title="enum in jrummikub.model">StoneTray.Direction</A> direction)</PRE> +<DL> +<DD>Subroutine to "drop" to consider and determine the direction the objects + dropped one collides with position-wise evade in +<P> +<DD><DL> +</DL> +</DD> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>object</CODE> - the object to add to Hand<DD><CODE>position</CODE> - <A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model"><CODE>Position</CODE></A> to put the object<DD><CODE>direction</CODE> - the direction the other stones evade in</DL> +</DD> +</DL> +<HR> + +<A NAME="dropUnchecked(jrummikub.model.Sizeable,jrummikub.model.Position,jrummikub.model.StoneTray.Direction)"><!-- --></A><A NAME="dropUnchecked(E, jrummikub.model.Position, jrummikub.model.StoneTray.Direction)"><!-- --></A><H3> +dropUnchecked</H3> +<PRE> +private void <B>dropUnchecked</B>(<A HREF="../../jrummikub/model/StoneTray.html" title="type parameter in StoneTray">E</A> object, + <A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A> position, + <A HREF="../../jrummikub/model/StoneTray.Direction.html" title="enum in jrummikub.model">StoneTray.Direction</A> direction)</PRE> +<DL> +<DD>Subroutine to "drop" to execute the actual drop +<P> +<DD><DL> +</DL> +</DD> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>object</CODE> - the object to add to Hand<DD><CODE>position</CODE> - <A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model"><CODE>Position</CODE></A> to put the object<DD><CODE>direction</CODE> - the direction the other stones evade in</DL> +</DD> +</DL> +<HR> + +<A NAME="getNewPosition(jrummikub.model.Sizeable,jrummikub.model.Position,jrummikub.model.StoneTray.Direction,jrummikub.model.Sizeable,jrummikub.model.Position)"><!-- --></A><A NAME="getNewPosition(E, jrummikub.model.Position, jrummikub.model.StoneTray.Direction, E, jrummikub.model.Position)"><!-- --></A><H3> +getNewPosition</H3> +<PRE> +private <A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A> <B>getNewPosition</B>(<A HREF="../../jrummikub/model/StoneTray.html" title="type parameter in StoneTray">E</A> object, + <A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A> position, + <A HREF="../../jrummikub/model/StoneTray.Direction.html" title="enum in jrummikub.model">StoneTray.Direction</A> newDirection, + <A HREF="../../jrummikub/model/StoneTray.html" title="type parameter in StoneTray">E</A> currentObject, + <A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A> currentPosition)</PRE> +<DL> +<DD><DL> +</DL> +</DD> +<DD><DL> +</DL> +</DD> +</DL> +<HR> + <A NAME="fixInvalidDrop(jrummikub.model.Sizeable,jrummikub.model.Position,jrummikub.model.StoneTray.Direction)"><!-- --></A><A NAME="fixInvalidDrop(E, jrummikub.model.Position, jrummikub.model.StoneTray.Direction)"><!-- --></A><H3> fixInvalidDrop</H3> <PRE> @@ -333,6 +490,83 @@ protected <A HREF="../../jrummikub/util/Pair.html" title="class in jrummikub.uti </DL> <HR> +<A NAME="lessOrEqual(double, double)"><!-- --></A><H3> +lessOrEqual</H3> +<PRE> +private static boolean <B>lessOrEqual</B>(double d, + double e)</PRE> +<DL> +<DD>Static method for determining a less or equal relation considering a + small fuzziness +<P> +<DD><DL> +</DL> +</DD> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>d</CODE> - the value to be less or equal<DD><CODE>e</CODE> - than the other one +<DT><B>Returns:</B><DD>if d is less or equal e</DL> +</DD> +</DL> +<HR> + +<A NAME="objectsOverlap(jrummikub.model.Sizeable,jrummikub.model.Position,jrummikub.model.Sizeable,jrummikub.model.Position)"><!-- --></A><A NAME="objectsOverlap(E, jrummikub.model.Position, E, jrummikub.model.Position)"><!-- --></A><H3> +objectsOverlap</H3> +<PRE> +private boolean <B>objectsOverlap</B>(<A HREF="../../jrummikub/model/StoneTray.html" title="type parameter in StoneTray">E</A> object1, + <A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A> position1, + <A HREF="../../jrummikub/model/StoneTray.html" title="type parameter in StoneTray">E</A> object2, + <A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A> position2)</PRE> +<DL> +<DD>Tests whether two objects overlap +<P> +<DD><DL> +</DL> +</DD> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>object1</CODE> - first object<DD><CODE>position1</CODE> - first object's position<DD><CODE>object2</CODE> - second object<DD><CODE>position2</CODE> - second object's position +<DT><B>Returns:</B><DD>whether they overlap</DL> +</DD> +</DL> +<HR> + +<A NAME="getMoveDirection(jrummikub.model.Sizeable,jrummikub.model.Position,jrummikub.util.Pair)"><!-- --></A><A NAME="getMoveDirection(E, jrummikub.model.Position, jrummikub.util.Pair)"><!-- --></A><H3> +getMoveDirection</H3> +<PRE> +private <A HREF="../../jrummikub/model/StoneTray.Direction.html" title="enum in jrummikub.model">StoneTray.Direction</A> <B>getMoveDirection</B>(<A HREF="../../jrummikub/model/StoneTray.html" title="type parameter in StoneTray">E</A> object, + <A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A> position, + <A HREF="../../jrummikub/util/Pair.html" title="class in jrummikub.util">Pair</A><<A HREF="../../jrummikub/model/StoneTray.html" title="type parameter in StoneTray">E</A>,<A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A>> blocking)</PRE> +<DL> +<DD>Returns the direction to move the object in +<P> +<DD><DL> +</DL> +</DD> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>object</CODE> - the object<DD><CODE>position</CODE> - the object's position<DD><CODE>blocking</CODE> - the object thats blocking +<DT><B>Returns:</B><DD>the direction</DL> +</DD> +</DL> +<HR> + +<A NAME="getMoveOrientation(jrummikub.model.Sizeable,jrummikub.model.Position,jrummikub.util.Pair)"><!-- --></A><A NAME="getMoveOrientation(E, jrummikub.model.Position, jrummikub.util.Pair)"><!-- --></A><H3> +getMoveOrientation</H3> +<PRE> +private boolean <B>getMoveOrientation</B>(<A HREF="../../jrummikub/model/StoneTray.html" title="type parameter in StoneTray">E</A> object, + <A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A> position, + <A HREF="../../jrummikub/util/Pair.html" title="class in jrummikub.util">Pair</A><<A HREF="../../jrummikub/model/StoneTray.html" title="type parameter in StoneTray">E</A>,<A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.model">Position</A>> blocking)</PRE> +<DL> +<DD>Will the object be moved horizontally or vertically +<P> +<DD><DL> +</DL> +</DD> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>object</CODE> - the object<DD><CODE>position</CODE> - the objects position<DD><CODE>blocking</CODE> - the object thats blocking +<DT><B>Returns:</B><DD>boolean vertical movement</DL> +</DD> +</DL> +<HR> + <A NAME="getPosition(jrummikub.model.Sizeable)"><!-- --></A><A NAME="getPosition(E)"><!-- --></A><H3> getPosition</H3> <PRE> @@ -351,6 +585,24 @@ public <A HREF="../../jrummikub/model/Position.html" title="class in jrummikub.m </DL> <HR> +<A NAME="contains(jrummikub.model.Sizeable)"><!-- --></A><A NAME="contains(E)"><!-- --></A><H3> +contains</H3> +<PRE> +public boolean <B>contains</B>(<A HREF="../../jrummikub/model/StoneTray.html" title="type parameter in StoneTray">E</A> object)</PRE> +<DL> +<DD><B>Description copied from interface: <CODE><A HREF="../../jrummikub/model/IStoneTray.html#contains(E)">IStoneTray</A></CODE></B></DD> +<DD>Search for an object within the stone tray +<P> +<DD><DL> +<DT><B>Specified by:</B><DD><CODE><A HREF="../../jrummikub/model/IStoneTray.html#contains(E)">contains</A></CODE> in interface <CODE><A HREF="../../jrummikub/model/IStoneTray.html" title="interface in jrummikub.model">IStoneTray</A><<A HREF="../../jrummikub/model/StoneTray.html" title="type parameter in StoneTray">E</A> extends <A HREF="../../jrummikub/model/Sizeable.html" title="interface in jrummikub.model">Sizeable</A>></CODE></DL> +</DD> +<DD><DL> +<DT><B>Parameters:</B><DD><CODE>object</CODE> - object to search for +<DT><B>Returns:</B><DD>object found in stone tray</DL> +</DD> +</DL> +<HR> + <A NAME="iterator()"><!-- --></A><H3> iterator</H3> <PRE> |