Files
Sushi/doc/suicideChess/Move.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 Fri Jan 13 17:00:37 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>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Move.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../suicideChess/Board.NoPieceOnSquare.html" title="class in suicideChess"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<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> &nbsp;
&nbsp;<A HREF="Move.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<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:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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: 27 $, $LastChangedDate: 2006-01-13 16:48:21 +0000 (Fri, 13 Jan 2006) $</DD>
<DT><B>Author:</B></DT>
<DD>Jean-Baptiste H&eacute;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>&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../suicideChess/Move.NotAValidMoveException.html" title="class in suicideChess">Move.NotAValidMoveException</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== 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>&nbsp;fromSquare,
<A HREF="../suicideChess/Square.html" title="class in suicideChess">Square</A>&nbsp;toSquare,
<A HREF="../suicideChess/Piece.html" title="class in suicideChess">Piece</A>&nbsp;movingPiece,
<A HREF="../suicideChess/Piece.html" title="class in suicideChess">Piece</A>&nbsp;capturePiece,
<A HREF="../suicideChess/Piece.html" title="class in suicideChess">Piece</A>&nbsp;promotionPiece)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;fromSquare,
<A HREF="../suicideChess/Square.html" title="class in suicideChess">Square</A>&nbsp;toSquare,
<A HREF="../suicideChess/Square.html" title="class in suicideChess">Square</A>&nbsp;enPassantSquare,
<A HREF="../suicideChess/Piece.html" title="class in suicideChess">Piece</A>&nbsp;movingPiece,
boolean&nbsp;isCapture)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;move,
<A HREF="../suicideChess/Board.html" title="class in suicideChess">Board</A>&nbsp;board)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is the constructor of the class.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== 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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../suicideChess/Move.html#display()">display</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Displays a move in great details.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../suicideChess/Move.html#enablesEnPassant()">enablesEnPassant</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../suicideChess/Move.html#isCaptureMove()">isCaptureMove</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../suicideChess/Move.html#isEnPassant()">isEnPassant</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../suicideChess/Move.html#isPromotionMove()">isPromotionMove</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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>&nbsp;that)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../suicideChess/Move.html#toString()">toString</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts a Move into a String.</TD>
</TR>
</TABLE>
&nbsp;<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>
&nbsp;
<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&nbsp;move,
<A HREF="../suicideChess/Board.html" title="class in suicideChess">Board</A>&nbsp;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>&nbsp;fromSquare,
<A HREF="../suicideChess/Square.html" title="class in suicideChess">Square</A>&nbsp;toSquare,
<A HREF="../suicideChess/Piece.html" title="class in suicideChess">Piece</A>&nbsp;movingPiece,
<A HREF="../suicideChess/Piece.html" title="class in suicideChess">Piece</A>&nbsp;capturePiece,
<A HREF="../suicideChess/Piece.html" title="class in suicideChess">Piece</A>&nbsp;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>&nbsp;fromSquare,
<A HREF="../suicideChess/Square.html" title="class in suicideChess">Square</A>&nbsp;toSquare,
<A HREF="../suicideChess/Square.html" title="class in suicideChess">Square</A>&nbsp;enPassantSquare,
<A HREF="../suicideChess/Piece.html" title="class in suicideChess">Piece</A>&nbsp;movingPiece,
boolean&nbsp;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>&nbsp;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>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Move.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../suicideChess/Board.NoPieceOnSquare.html" title="class in suicideChess"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<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> &nbsp;
&nbsp;<A HREF="Move.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<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:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>