au.com.solidsoftware.multimahjong.mmc.game
Class Set

java.lang.Object
  |
  +--java.awt.Component
        |
        +--au.com.solidsoftware.multimahjong.shared.Tile
              |
              +--au.com.solidsoftware.multimahjong.mmc.game.Set

public class Set
extends Tile

Set represent a single group of tiles in a player's hands. The Set class provides the storage for a single set. The set will contain a character representing the set type, the suit and tile number of the first tile in that set.

Author:
Victor Leung
See Also:
Serialized Form

Inner classes inherited from class java.awt.Component
java.awt.Component.AWTTreeLock
 
Field Summary
static int CHOW
           
static int DECLARED_KONG
           
static int KONG
           
static int PAIR
           
static int PUNG
           
private  int type
          Type of Set that is formed.
 
Fields inherited from class au.com.solidsoftware.multimahjong.shared.Tile
BAMBOO, CHARACTER, CIRCLE, DRAGON, EAST, GREEN, NORTH, number, RED, SOUTH, suit, TILE_H, TILE_W, tileImages, tracker, WEST, WHITE, WIND
 
Fields inherited from class java.awt.Component
actionListenerK, adjustmentListenerK, appContext, assert, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, hasFocus, height, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, serialVersionUID, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowListenerK, x, y
 
Constructor Summary
Set(int number, int suit, int type)
          Class contructor.
 
Method Summary
 int getType()
          Access function - returns the type of the Set.
 void pung2Kong()
          Changes the set type from a Pung to a Kong.
 
Methods inherited from class au.com.solidsoftware.multimahjong.shared.Tile
backImage, compareTo, ensureImagesLoaded, faceImage, getNumber, getString, getSuit, loadImages, main
 
Methods inherited from class java.awt.Component
, action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, coalesceEvents, constructComponentName, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, dispatchEventImpl, doLayout, enable, enable, enableEvents, enableInputMethods, eventEnabled, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, initIDs, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, lightweightPrint, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, paramString, postEvent, postsOldMouseEvents, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, readObject, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate, writeObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

CHOW

public static final int CHOW

PUNG

public static final int PUNG

KONG

public static final int KONG

DECLARED_KONG

public static final int DECLARED_KONG

PAIR

public static final int PAIR

type

private int type
Type of Set that is formed.
Constructor Detail

Set

public Set(int number,
           int suit,
           int type)
Class contructor.

Parameters:
number - Number of the first tile in the Set.
suit - Suit of the first tile in the Set.
type - Type of Set that is formed.
Method Detail

pung2Kong

public void pung2Kong()
Changes the set type from a Pung to a Kong.


getType

public int getType()
Access function - returns the type of the Set.

Returns:
int Type of the Set.