Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

simplegame
Class SimpleGameDataModel  view SimpleGameDataModel download SimpleGameDataModel.java

java.lang.Object
  extended bysimplegame.SimpleGameDataModel
All Implemented Interfaces:
SimpleGameDataModelIF

public class SimpleGameDataModel
extends java.lang.Object
implements SimpleGameDataModelIF


Nested Class Summary
 
Nested classes inherited from class simplegame.SimpleGameDataModelIF
SimpleGameDataModelIF.GameUpdateListener
 
Field Summary
private  int[][] gameBoard
           
private  int size
           
private  java.util.Vector vUpdateListener
           
 
Constructor Summary
SimpleGameDataModel(int size)
           
 
Method Summary
 void addGameUpdateListener(SimpleGameDataModelIF.GameUpdateListener ul)
           
private  void fireUpdate(int row, int column, int id)
           
 int getRPCharacterAt(int row, int column)
           
 int getSize()
           
 int getWinnerID()
           
 void setRPCharacterAt(int row, int column, int id)
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

gameBoard

private int[][] gameBoard

vUpdateListener

private java.util.Vector vUpdateListener

size

private int size
Constructor Detail

SimpleGameDataModel

public SimpleGameDataModel(int size)
Method Detail

fireUpdate

private void fireUpdate(int row,
                        int column,
                        int id)

addGameUpdateListener

public void addGameUpdateListener(SimpleGameDataModelIF.GameUpdateListener ul)
Specified by:
addGameUpdateListener in interface SimpleGameDataModelIF

setRPCharacterAt

public void setRPCharacterAt(int row,
                             int column,
                             int id)
Specified by:
setRPCharacterAt in interface SimpleGameDataModelIF

getSize

public int getSize()
Specified by:
getSize in interface SimpleGameDataModelIF

getRPCharacterAt

public int getRPCharacterAt(int row,
                            int column)
Specified by:
getRPCharacterAt in interface SimpleGameDataModelIF

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).


getWinnerID

public int getWinnerID()
Specified by:
getWinnerID in interface SimpleGameDataModelIF