Documentation of 'jvx.cellular.PnMinesweeper' Java class
PnMinesweeper ("JavaView Reference Manual")
"JavaView? v5.03.003"
jvx.cellular

Class PnMinesweeper

  • All Implemented Interfaces:
    java.awt.event.KeyListener, java.io.Serializable, java.lang.Cloneable, java.lang.Runnable, java.util.EventListener, PsUpdateIf, PjWorkshopIf, PvPickListenerIf


    public class PnMinesweeper
    extends PnCellOperator
    implements java.awt.event.KeyListener
    Minesweeper game on arbitrary polyhedral surfaces.
    See Also:
    Serialized Form
    Author:
    Ulrich Reitebuch
    Version:
    08.10.12, 3.21 revised (kp) Restore of elementColors in reset() after explosion.
    08.03.03, 3.20 revised (kp) Avoid that thread is started multiple times at once.
    18.12.02, 3.10 revised (ur) Adapted to changes in exploding of PgElementSet.
    28.12.01, 3.00 revised (kp) Full revision when incorporating the new workshop handling.
    02.05.01, 2.00 revised (ur) moved to jvx.geom, restore original colors.
    16.05.00, 1.00 created (ur)
    • Constructor Detail

      • PnMinesweeper

        public PnMinesweeper()
        Constructor
      • PnMinesweeper

        public PnMinesweeper(PgElementSet geom)
        Deprecated. use constructor prj=new PwMinesweeper();prj.setGeometry(geom);prj.reset();
        Constructor.
    • Method Detail

      • close

        public void close()
        Remove pick focus and update from minesweeper, reset elementSet's colors to previous state.
        Overrides:
        close in class PnCellOperator
      • reset

        public void reset()
        Reset workshop and geometry to original state.
        Overrides:
        reset in class PnCellOperator
      • setExplodeDisplay

        public void setExplodeDisplay(PvDisplayIf disp)
        Deprecated. use setDisplay(PvDisplayIf)
        Store currently active display used in the explosion.
      • setDisplay

        public void setDisplay(PvDisplayIf display)
        Store currently active display. This is necessary to get the current camera position. Without this we can't find a direction showing downwards on the monitor to get a proper explosion.
        Specified by:
        setDisplay in interface PjWorkshopIf
        Overrides:
        setDisplay in class PjWorkshop
      • setMines

        public void setMines(int noMine)
        Get random positions for mines.
      • keyPressed

        public void keyPressed(java.awt.event.KeyEvent e)
        Store, if shift key is pressed.
        Specified by:
        keyPressed in interface java.awt.event.KeyListener
      • keyReleased

        public void keyReleased(java.awt.event.KeyEvent e)
        Store, if shift key is pressed.
        Specified by:
        keyReleased in interface java.awt.event.KeyListener
      • keyTyped

        public void keyTyped(java.awt.event.KeyEvent e)
        Just to fulfill KeyListener interface.
        Specified by:
        keyTyped in interface java.awt.event.KeyListener
      • run

        public void run()
        Explode the geometry if a mined element is hit. This method internally blocks when the animation is started. Note, the explosion must run in another thread, otherwise it is not possible to let the explosion run as modal animation.
        Specified by:
        run in interface java.lang.Runnable
        Overrides:
        run in class PnCellOperator
      • restoreColors

        public void restoreColors()
        Restore element colors and names to the state before playing.
        Overrides:
        restoreColors in class PnCellOperator
      • start

        public void start()
        Just to disable PnCellOperator.start().
        Overrides:
        start in class PnCellOperator
      • stop

        public void stop()
        Just to disable PnCellOperator.stop().
        Overrides:
        stop in class PnCellOperator
"JavaView? v5.03.003"

"

The software JavaView? is copyright protected. All Rights Reserved.
"

You see the box below because you did not login.