614 lines
26 KiB
HTML
614 lines
26 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!--NewPage-->
|
|
<HTML>
|
|
<HEAD>
|
|
<!-- Generated by javadoc (build 1.5.0_05) on Tue Jan 17 15:42:46 GMT 2006 -->
|
|
<TITLE>
|
|
Move
|
|
</TITLE>
|
|
|
|
<META NAME="keywords" CONTENT="suicideChess.Move class">
|
|
|
|
<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
|
|
|
|
<SCRIPT type="text/javascript">
|
|
function windowTitle()
|
|
{
|
|
parent.document.title="Move";
|
|
}
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
</NOSCRIPT>
|
|
|
|
</HEAD>
|
|
|
|
<BODY BGCOLOR="white" onload="windowTitle();">
|
|
|
|
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<A NAME="navbar_top"><!-- --></A>
|
|
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
|
<TR>
|
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
|
<A NAME="navbar_top_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../suicideChess/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Move.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
</EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../suicideChess/ComputerPlayer.html" title="class in suicideChess"><B>PREV CLASS</B></A>
|
|
<A HREF="../suicideChess/Move.NotAValidMoveException.html" title="class in suicideChess"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../index.html?suicideChess/Move.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="Move.html" target="_top"><B>NO FRAMES</B></A>
|
|
<SCRIPT type="text/javascript">
|
|
<!--
|
|
if(window==top) {
|
|
document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
|
|
}
|
|
//-->
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
|
|
</NOSCRIPT>
|
|
|
|
|
|
</FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="skip-navbar_top"></A>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
|
|
<HR>
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<H2>
|
|
<FONT SIZE="-1">
|
|
suicideChess</FONT>
|
|
<BR>
|
|
Class Move</H2>
|
|
<PRE>
|
|
java.lang.Object
|
|
<IMG SRC="../resources/inherit.gif" ALT="extended by "><B>suicideChess.Move</B>
|
|
</PRE>
|
|
<HR>
|
|
<DL>
|
|
<DT><PRE>public class <B>Move</B><DT>extends java.lang.Object</DL>
|
|
</PRE>
|
|
|
|
<P>
|
|
This class is used for moves representation.
|
|
<P>
|
|
|
|
<P>
|
|
<DL>
|
|
<DT><B>Version:</B></DT>
|
|
<DD>$LastChangedRevision$, $LastChangedDate$</DD>
|
|
<DT><B>Author:</B></DT>
|
|
<DD>Jean-Baptiste Hétier</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<P>
|
|
<!-- ======== NESTED CLASS SUMMARY ======== -->
|
|
|
|
<A NAME="nested_class_summary"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
|
<B>Nested Class Summary</B></FONT></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> class</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../suicideChess/Move.NotAValidMoveException.html" title="class in suicideChess">Move.NotAValidMoveException</A></B></CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
|
|
<A NAME="constructor_summary"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
|
<B>Constructor Summary</B></FONT></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../suicideChess/Move.html#Move(suicideChess.Square, suicideChess.Square, suicideChess.Piece, suicideChess.Piece, suicideChess.Piece)">Move</A></B>(<A HREF="../suicideChess/Square.html" title="class in suicideChess">Square</A> fromSquare,
|
|
<A HREF="../suicideChess/Square.html" title="class in suicideChess">Square</A> toSquare,
|
|
<A HREF="../suicideChess/Piece.html" title="class in suicideChess">Piece</A> movingPiece,
|
|
<A HREF="../suicideChess/Piece.html" title="class in suicideChess">Piece</A> capturePiece,
|
|
<A HREF="../suicideChess/Piece.html" title="class in suicideChess">Piece</A> promotionPiece)</CODE>
|
|
|
|
<BR>
|
|
This is the constructor of the class.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../suicideChess/Move.html#Move(suicideChess.Square, suicideChess.Square, suicideChess.Square, suicideChess.Piece, boolean)">Move</A></B>(<A HREF="../suicideChess/Square.html" title="class in suicideChess">Square</A> fromSquare,
|
|
<A HREF="../suicideChess/Square.html" title="class in suicideChess">Square</A> toSquare,
|
|
<A HREF="../suicideChess/Square.html" title="class in suicideChess">Square</A> enPassantSquare,
|
|
<A HREF="../suicideChess/Piece.html" title="class in suicideChess">Piece</A> movingPiece,
|
|
boolean isCapture)</CODE>
|
|
|
|
<BR>
|
|
This is the constructor of the class.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../suicideChess/Move.html#Move(java.lang.String, suicideChess.Board)">Move</A></B>(java.lang.String move,
|
|
<A HREF="../suicideChess/Board.html" title="class in suicideChess">Board</A> board)</CODE>
|
|
|
|
<BR>
|
|
This is the constructor of the class.</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
|
|
<A NAME="method_summary"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
|
<B>Method Summary</B></FONT></TH>
|
|
</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="../suicideChess/Move.html#display()">display</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Displays a move in great details.</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="../suicideChess/Move.html#enablesEnPassant()">enablesEnPassant</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns a boolean saying is a Move makes 'en passant' move possible.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../suicideChess/Square.html" title="class in suicideChess">Square</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../suicideChess/Move.html#fromSquare()">fromSquare</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns the <A HREF="../suicideChess/Square.html" title="class in suicideChess"><CODE>Square</CODE></A> to move from in a Move</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../suicideChess/Piece.html" title="class in suicideChess">Piece</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../suicideChess/Move.html#getCapturedPiece()">getCapturedPiece</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns the <A HREF="../suicideChess/Piece.html" title="class in suicideChess"><CODE>Piece</CODE></A> to be captured in a Move</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../suicideChess/Square.html" title="class in suicideChess">Square</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../suicideChess/Move.html#getEnPassantSquare()">getEnPassantSquare</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns the enPassant Square for a move.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../suicideChess/Piece.html" title="class in suicideChess">Piece</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../suicideChess/Move.html#getMovingPiece()">getMovingPiece</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns the moving <A HREF="../suicideChess/Piece.html" title="class in suicideChess"><CODE>Piece</CODE></A> of a Move.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../suicideChess/Piece.html" title="class in suicideChess">Piece</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../suicideChess/Move.html#getPromotionPiece()">getPromotionPiece</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns the promotion <A HREF="../suicideChess/Piece.html" title="class in suicideChess"><CODE>Piece</CODE></A> of a Move</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="../suicideChess/Move.html#isCaptureMove()">isCaptureMove</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns a boolean saying if a Move is a capture move</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="../suicideChess/Move.html#isEnPassant()">isEnPassant</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns a boolean saying is a Move is an 'en passant' move.</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="../suicideChess/Move.html#isPromotionMove()">isPromotionMove</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns a boolean saying if a Move is a promotion or not.</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="../suicideChess/Move.html#isSimpleEqual(suicideChess.Move)">isSimpleEqual</A></B>(<A HREF="../suicideChess/Move.html" title="class in suicideChess">Move</A> that)</CODE>
|
|
|
|
<BR>
|
|
Tests the equality of two moves by just looking at the fromSquare and the toSquare</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../suicideChess/Square.html" title="class in suicideChess">Square</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../suicideChess/Move.html#toSquare()">toSquare</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns the <A HREF="../suicideChess/Square.html" title="class in suicideChess"><CODE>Square</CODE></A> to move to in a Move</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> java.lang.String</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../suicideChess/Move.html#toString()">toString</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Converts a Move into a String.</TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
|
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<P>
|
|
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
|
|
<A NAME="constructor_detail"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
|
<B>Constructor Detail</B></FONT></TH>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<A NAME="Move(java.lang.String, suicideChess.Board)"><!-- --></A><H3>
|
|
Move</H3>
|
|
<PRE>
|
|
public <B>Move</B>(java.lang.String move,
|
|
<A HREF="../suicideChess/Board.html" title="class in suicideChess">Board</A> board)
|
|
throws <A HREF="../suicideChess/Move.NotAValidMoveException.html" title="class in suicideChess">Move.NotAValidMoveException</A>,
|
|
<A HREF="../suicideChess/Square.NotAValidSquare.html" title="class in suicideChess">Square.NotAValidSquare</A></PRE>
|
|
<DL>
|
|
<DD>This is the constructor of the class.
|
|
<P>
|
|
<DL>
|
|
<DT><B>Parameters:</B><DD><CODE>move</CODE> - A String containing of type "e2e4" (4 chars), "b7b8q" (5 chars) for promotions.
|
|
It is the standard algebraic notation used for chess.<DD><CODE>board</CODE> - A <A HREF="../suicideChess/Board.html" title="class in suicideChess"><CODE>Board</CODE></A> to be able to locate the pieces.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../suicideChess/Move.NotAValidMoveException.html" title="class in suicideChess">Move.NotAValidMoveException</A></CODE> - When the String is not legal (too long or too short).
|
|
<DD><CODE><A HREF="../suicideChess/Square.NotAValidSquare.html" title="class in suicideChess">Square.NotAValidSquare</A></CODE> - It the String is not legal (not standard algebraic notation).<DT><B>See Also:</B><DD><A HREF="../suicideChess/Board.html" title="class in suicideChess"><CODE>Board</CODE></A></DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="Move(suicideChess.Square, suicideChess.Square, suicideChess.Piece, suicideChess.Piece, suicideChess.Piece)"><!-- --></A><H3>
|
|
Move</H3>
|
|
<PRE>
|
|
public <B>Move</B>(<A HREF="../suicideChess/Square.html" title="class in suicideChess">Square</A> fromSquare,
|
|
<A HREF="../suicideChess/Square.html" title="class in suicideChess">Square</A> toSquare,
|
|
<A HREF="../suicideChess/Piece.html" title="class in suicideChess">Piece</A> movingPiece,
|
|
<A HREF="../suicideChess/Piece.html" title="class in suicideChess">Piece</A> capturePiece,
|
|
<A HREF="../suicideChess/Piece.html" title="class in suicideChess">Piece</A> promotionPiece)
|
|
throws <A HREF="../suicideChess/Square.NotAValidSquare.html" title="class in suicideChess">Square.NotAValidSquare</A></PRE>
|
|
<DL>
|
|
<DD>This is the constructor of the class.
|
|
<P>
|
|
<DL>
|
|
<DT><B>Parameters:</B><DD><CODE>fromSquare</CODE> - The <A HREF="../suicideChess/Square.html" title="class in suicideChess"><CODE>Square</CODE></A> to move from.<DD><CODE>toSquare</CODE> - The <A HREF="../suicideChess/Square.html" title="class in suicideChess"><CODE>Square</CODE></A> to move to.<DD><CODE>movingPiece</CODE> - The <A HREF="../suicideChess/Piece.html" title="class in suicideChess"><CODE>Piece</CODE></A> to be moved.<DD><CODE>capturePiece</CODE> - The <A HREF="../suicideChess/Piece.html" title="class in suicideChess"><CODE>Piece</CODE></A> to be captured. Piece.NONE if none.<DD><CODE>promotionPiece</CODE> - The {link Piece} to be promoted to. Piece.NONE if none.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../suicideChess/Square.NotAValidSquare.html" title="class in suicideChess">Square.NotAValidSquare</A></CODE> - If Squares are not valid.<DT><B>See Also:</B><DD><A HREF="../suicideChess/Square.html" title="class in suicideChess"><CODE>Square</CODE></A>,
|
|
<A HREF="../suicideChess/Piece.html" title="class in suicideChess"><CODE>Piece</CODE></A></DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="Move(suicideChess.Square, suicideChess.Square, suicideChess.Square, suicideChess.Piece, boolean)"><!-- --></A><H3>
|
|
Move</H3>
|
|
<PRE>
|
|
public <B>Move</B>(<A HREF="../suicideChess/Square.html" title="class in suicideChess">Square</A> fromSquare,
|
|
<A HREF="../suicideChess/Square.html" title="class in suicideChess">Square</A> toSquare,
|
|
<A HREF="../suicideChess/Square.html" title="class in suicideChess">Square</A> enPassantSquare,
|
|
<A HREF="../suicideChess/Piece.html" title="class in suicideChess">Piece</A> movingPiece,
|
|
boolean isCapture)
|
|
throws <A HREF="../suicideChess/Square.NotAValidSquare.html" title="class in suicideChess">Square.NotAValidSquare</A></PRE>
|
|
<DL>
|
|
<DD>This is the constructor of the class.
|
|
It should be used only for moves that enable or are 'en passant' capture.
|
|
<P>
|
|
<DL>
|
|
<DT><B>Parameters:</B><DD><CODE>fromSquare</CODE> - The <A HREF="../suicideChess/Square.html" title="class in suicideChess"><CODE>Square</CODE></A> to move from.<DD><CODE>toSquare</CODE> - The <A HREF="../suicideChess/Square.html" title="class in suicideChess"><CODE>Square</CODE></A> to move to.<DD><CODE>enPassantSquare</CODE> - The 'en passant' <A HREF="../suicideChess/Square.html" title="class in suicideChess"><CODE>Square</CODE></A>.<DD><CODE>movingPiece</CODE> - The <A HREF="../suicideChess/Piece.html" title="class in suicideChess"><CODE>Piece</CODE></A> to be moved.<DD><CODE>isCapture</CODE> - This boolean is used to differenciate 'en passant' captures from moves that simply enable 'en passant' capture.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../suicideChess/Square.NotAValidSquare.html" title="class in suicideChess">Square.NotAValidSquare</A></CODE> - If Squares are not valid.<DT><B>See Also:</B><DD><A HREF="../suicideChess/Square.html" title="class in suicideChess"><CODE>Square</CODE></A>,
|
|
<A HREF="../suicideChess/Piece.html" title="class in suicideChess"><CODE>Piece</CODE></A></DL>
|
|
</DL>
|
|
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
|
|
<A NAME="method_detail"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
|
<B>Method Detail</B></FONT></TH>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<A NAME="fromSquare()"><!-- --></A><H3>
|
|
fromSquare</H3>
|
|
<PRE>
|
|
public <A HREF="../suicideChess/Square.html" title="class in suicideChess">Square</A> <B>fromSquare</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns the <A HREF="../suicideChess/Square.html" title="class in suicideChess"><CODE>Square</CODE></A> to move from in a Move
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>Square<DT><B>See Also:</B><DD><A HREF="../suicideChess/Square.html" title="class in suicideChess"><CODE>Square</CODE></A></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="toSquare()"><!-- --></A><H3>
|
|
toSquare</H3>
|
|
<PRE>
|
|
public <A HREF="../suicideChess/Square.html" title="class in suicideChess">Square</A> <B>toSquare</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns the <A HREF="../suicideChess/Square.html" title="class in suicideChess"><CODE>Square</CODE></A> to move to in a Move
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>Square<DT><B>See Also:</B><DD><A HREF="../suicideChess/Square.html" title="class in suicideChess"><CODE>Square</CODE></A></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="isPromotionMove()"><!-- --></A><H3>
|
|
isPromotionMove</H3>
|
|
<PRE>
|
|
public boolean <B>isPromotionMove</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns a boolean saying if a Move is a promotion or not.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>boolean</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getPromotionPiece()"><!-- --></A><H3>
|
|
getPromotionPiece</H3>
|
|
<PRE>
|
|
public <A HREF="../suicideChess/Piece.html" title="class in suicideChess">Piece</A> <B>getPromotionPiece</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns the promotion <A HREF="../suicideChess/Piece.html" title="class in suicideChess"><CODE>Piece</CODE></A> of a Move
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>Piece<DT><B>See Also:</B><DD><A HREF="../suicideChess/Piece.html" title="class in suicideChess"><CODE>Piece</CODE></A></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getMovingPiece()"><!-- --></A><H3>
|
|
getMovingPiece</H3>
|
|
<PRE>
|
|
public <A HREF="../suicideChess/Piece.html" title="class in suicideChess">Piece</A> <B>getMovingPiece</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns the moving <A HREF="../suicideChess/Piece.html" title="class in suicideChess"><CODE>Piece</CODE></A> of a Move.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>Piece<DT><B>See Also:</B><DD><A HREF="../suicideChess/Piece.html" title="class in suicideChess"><CODE>Piece</CODE></A></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="isCaptureMove()"><!-- --></A><H3>
|
|
isCaptureMove</H3>
|
|
<PRE>
|
|
public boolean <B>isCaptureMove</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns a boolean saying if a Move is a capture move
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>boolean</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getCapturedPiece()"><!-- --></A><H3>
|
|
getCapturedPiece</H3>
|
|
<PRE>
|
|
public <A HREF="../suicideChess/Piece.html" title="class in suicideChess">Piece</A> <B>getCapturedPiece</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns the <A HREF="../suicideChess/Piece.html" title="class in suicideChess"><CODE>Piece</CODE></A> to be captured in a Move
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>Piece</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="enablesEnPassant()"><!-- --></A><H3>
|
|
enablesEnPassant</H3>
|
|
<PRE>
|
|
public boolean <B>enablesEnPassant</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns a boolean saying is a Move makes 'en passant' move possible.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="isEnPassant()"><!-- --></A><H3>
|
|
isEnPassant</H3>
|
|
<PRE>
|
|
public boolean <B>isEnPassant</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns a boolean saying is a Move is an 'en passant' move.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getEnPassantSquare()"><!-- --></A><H3>
|
|
getEnPassantSquare</H3>
|
|
<PRE>
|
|
public <A HREF="../suicideChess/Square.html" title="class in suicideChess">Square</A> <B>getEnPassantSquare</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns the enPassant Square for a move.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="toString()"><!-- --></A><H3>
|
|
toString</H3>
|
|
<PRE>
|
|
public java.lang.String <B>toString</B>()</PRE>
|
|
<DL>
|
|
<DD>Converts a Move into a String.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>
|
|
</DD>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>String</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="isSimpleEqual(suicideChess.Move)"><!-- --></A><H3>
|
|
isSimpleEqual</H3>
|
|
<PRE>
|
|
public boolean <B>isSimpleEqual</B>(<A HREF="../suicideChess/Move.html" title="class in suicideChess">Move</A> that)</PRE>
|
|
<DL>
|
|
<DD>Tests the equality of two moves by just looking at the fromSquare and the toSquare
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>that</CODE> - A move to test
|
|
<DT><B>Returns:</B><DD>boolean</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="display()"><!-- --></A><H3>
|
|
display</H3>
|
|
<PRE>
|
|
public void <B>display</B>()</PRE>
|
|
<DL>
|
|
<DD>Displays a move in great details.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<HR>
|
|
|
|
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<A NAME="navbar_bottom"><!-- --></A>
|
|
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
|
<TR>
|
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
|
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../suicideChess/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Move.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
</EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../suicideChess/ComputerPlayer.html" title="class in suicideChess"><B>PREV CLASS</B></A>
|
|
<A HREF="../suicideChess/Move.NotAValidMoveException.html" title="class in suicideChess"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../index.html?suicideChess/Move.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="Move.html" target="_top"><B>NO FRAMES</B></A>
|
|
<SCRIPT type="text/javascript">
|
|
<!--
|
|
if(window==top) {
|
|
document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
|
|
}
|
|
//-->
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
|
|
</NOSCRIPT>
|
|
|
|
|
|
</FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="skip-navbar_bottom"></A>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
|
|
<HR>
|
|
|
|
</BODY>
|
|
</HTML>
|