📄 square.html
字号:
int y, int row, int column)</CODE>
<BR>
iteration3 calls remove and iterates with(x,y+1,row,column)</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="Square.html#iteration4(int, int, int, int)">iteration4</A></B>(int x, int y, int row, int column)</CODE>
<BR>
iteration4 calls remove and iterates with(x+1,y+1,row,column)</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="Square.html#iteration5(int, int, int, int)">iteration5</A></B>(int x, int y, int row, int column)</CODE>
<BR>
iteration5 calls remove and iterates with(x,y-1,row,column)</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="Square.html#iteration6(int, int, int, int)">iteration6</A></B>(int x, int y, int row, int column)</CODE>
<BR>
iteration6 calls remove and iterates with(x-1,y-1,row,column)</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="Square.html#iteration7(int, int, int, int)">iteration7</A></B>(int x, int y, int row, int column)</CODE>
<BR>
iteration7 calls remove and iterates with(x+1,y-1,row,column)</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="Square.html#iteration8(int, int, int, int)">iteration8</A></B>(int x, int y, int row, int column)</CODE>
<BR>
iteration8 calls remove and iterates with(x-1,y+1,row,column)</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="Square.html#mouseClicked(java.awt.event.MouseEvent)">mouseClicked</A></B>(java.awt.event.MouseEvent e)</CODE>
<BR>
not used in this program</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="Square.html#mouseEntered(java.awt.event.MouseEvent)">mouseEntered</A></B>(java.awt.event.MouseEvent e)</CODE>
<BR>
not used in this program</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="Square.html#mouseExited(java.awt.event.MouseEvent)">mouseExited</A></B>(java.awt.event.MouseEvent e)</CODE>
<BR>
not used in this program</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="Square.html#mousePressed(java.awt.event.MouseEvent)">mousePressed</A></B>(java.awt.event.MouseEvent e)</CODE>
<BR>
mousedPresed changes the state of the simle when a button is clicked</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="Square.html#mouseReleased(java.awt.event.MouseEvent)">mouseReleased</A></B>(java.awt.event.MouseEvent e)</CODE>
<BR>
mousedReleased adds the funtions to the square, increments the numclicked, starts the timer, changes the state of the smile and of the game,places and removes flags, explodes mines(makes then red), updates the flags left display and uncovers the square.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_javax.swing.JButton"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class javax.swing.JButton</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>configurePropertiesFromAction, getAccessibleContext, getUIClassID, isDefaultButton, isDefaultCapable, paramString, removeNotify, setDefaultCapable, updateUI</CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_javax.swing.AbstractButton"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class javax.swing.AbstractButton</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>addActionListener, addChangeListener, addItemListener, checkHorizontalKey, checkVerticalKey, createActionListener, createActionPropertyChangeListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getActionListeners, getChangeListeners, getDisabledIcon, getDisabledSelectedIcon, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getItemListeners, getLabel, getMargin, getMnemonic, getModel, getMultiClickThreshhold, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, init, isBorderPainted, isContentAreaFilled, isFocusPainted, isRolloverEnabled, isSelected, paintBorder, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setDisplayedMnemonicIndex, setEnabled, setFocusPainted, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabel, setMargin, setMnemonic, setMnemonic, setModel, setMultiClickThreshhold, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition</CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_javax.swing.JComponent"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class javax.swing.JComponent</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update</CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.awt.Container"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.awt.Container</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree</CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.awt.Component"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.awt.Component</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle</CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="mine"><!-- --></A><H3>
mine</H3>
<PRE>
public boolean <B>mine</B></PRE>
<DL>
<DD>mine indicates the state of a square, the square behaves appropriatly if it is a mine
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="GameOver"><!-- --></A><H3>
GameOver</H3>
<PRE>
public static boolean <B>GameOver</B></PRE>
<DL>
<DD>GameOver indicates the state of uncovering a mine, if == true a nw game needs to be started.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="GameWon"><!-- --></A><H3>
GameWon</H3>
<PRE>
public static boolean <B>GameWon</B></PRE>
<DL>
<DD>GameWon indicates the state of a game being won.that is all the mines have been flagedright and all other squares uncovered safly
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="sUncovered"><!-- --></A><H3>
sUncovered</H3>
<PRE>
public boolean <B>sUncovered</B></PRE>
<DL>
<DD>sUncovered indicates where a square has been uncovered or not.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="count"><!-- --></A><H3>
count</H3>
<PRE>
public int <B>count</B></PRE>
<DL>
<DD>count is the number of mines around this square, incremented by game class when a mine is placed
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="flagnum"><!-- --></A><H3>
flagnum</H3>
<PRE>
public static int <B>flagnum</B></PRE>
<DL>
<DD>flagnum is the number of flas that can be displayed equal to number of mine
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="flagused"><!-- --></A><H3>
flagused</H3>
<PRE>
public static int <B>flagused</B></PRE>
<DL>
<DD>flagused is the number of flags used so far
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="flagleft"><!-- --></A><H3>
flagleft</H3>
<PRE>
public static int <B>flagleft</B></PRE>
<DL>
<DD>flagleft is the number of flags that have not been placed on the game equal to flagnum - flags used
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="flagedright"><!-- --></A><H3>
flagedright</H3>
<PRE>
public boolean <B>flagedright</B></PRE>
<DL>
<DD>indicates when a flaged is places where it is in the wright place.that is if it has been placed on the location of a mine
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="T100"><!-- --></A><H3>
T100</H3>
<PRE>
public static int <B>T100</B></PRE>
<DL>
<DD>T1 the int representing the units in the flags left
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="T10"><!-- --></A><H3>
T10</H3>
<PRE>
public static int <B>T10</B></PRE>
<DL>
<DD>T1 the int representing the units in the flags left
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="T"><!-- --></A><H3>
T</H3>
<PRE>
public static int <B>T</B></PRE>
<DL>
<DD>T1 the int representing the units in the flags left
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="numclicks"><!-- --></A><H3>
numclicks</H3>
<PRE>
public static int <B>numclicks</B></PRE>
<DL>
<DD>numclick indicates the number of times the mouse is click during a game, its main use is the start the timer thread when numclicks == 1 and to stop the thread if ==0
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="isblank"><!-- --></A><H3>
isblank</H3>
<PRE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -