au.com.solidsoftware.multimahjong.mmc.co
Class AITile

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

final class AITile
extends Tile

Tile class is supposed to asign Id to every single tile but somehow these Id(s) were missing during the implementaion. AITile is a quick fix of this problem. Tile's Id is extremely important to AI because it is the eye of AI. Without Id, AI is not able to distinguish between different tiles. E.g. 4bam and 4bam. Although these 2 tiles are equivalent, by relying on different Id, AI is still able to know that there are in fact 2 similar tiles, not one.

Author:
Long Tang 38467 (lqkt@ecr.mu.oz.au)
See Also:
Serialized Form

Inner classes inherited from class java.awt.Component
java.awt.Component.AWTTreeLock
 
Field Summary
protected  int id
           
 
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
AITile(int number, int suit, int id)
          AITile is the same as its base class Tile except all AITiles have Id
 
Method Summary
 int getId()
          returns tileId
 
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

id

protected final int id
Constructor Detail

AITile

public AITile(int number,
              int suit,
              int id)
AITile is the same as its base class Tile except all AITiles have Id
Method Detail

getId

public int getId()
returns tileId
Parameters:
none -  
Returns:
unique Id of the tile