org.argosfields.battlefield
Class BattleField

java.lang.Object
  extended byorg.argosfields.battlefield.BattleField
All Implemented Interfaces:
Serializable

public class BattleField
extends Object
implements Serializable

BattleField.java

Version:
$Revision: 1.4 $ $Date: 2003/12/01 07:38:05 $
Author:
Xavier Cho
See Also:
Serialized Form

Constructor Summary
BattleField(int columns, int rows)
           
 
Method Summary
 int getColumns()
           
 String getDescription()
           
 int getIndexFromPoint(int x, int y)
           
 int getIndexFromPoint(org.eclipse.swt.graphics.Point point)
           
 int getIndexFromPosition(int column, int row)
           
 String getName()
           
 int[] getNeighboringIndexes(int index)
           
 int getPlayerCount()
           
 org.eclipse.swt.graphics.Point getPositionFromIndex(int index)
           
 int getRows()
           
 Tile getTile(int index)
           
 Tile getTile(int column, int row)
           
 org.eclipse.swt.graphics.Rectangle getTileBounds(int index)
           
 org.eclipse.swt.graphics.Rectangle getTileBounds(int column, int row)
           
 Unit getUnit(int index)
           
 Unit getUnit(int column, int row)
           
 void setDescription(String string)
           
 void setName(String string)
           
 void setPlayerCount(int i)
           
 void setTile(int column, int row, Tile tile)
           
 void setUnit(int column, int row, Unit unit)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BattleField

public BattleField(int columns,
                   int rows)
Method Detail

getTile

public Tile getTile(int column,
                    int row)

getTile

public Tile getTile(int index)

getIndexFromPoint

public int getIndexFromPoint(org.eclipse.swt.graphics.Point point)

getIndexFromPoint

public int getIndexFromPoint(int x,
                             int y)

setTile

public void setTile(int column,
                    int row,
                    Tile tile)

getUnit

public Unit getUnit(int column,
                    int row)

getUnit

public Unit getUnit(int index)

setUnit

public void setUnit(int column,
                    int row,
                    Unit unit)

getDescription

public String getDescription()
Returns:

getRows

public int getRows()
Returns:

getName

public String getName()
Returns:

getColumns

public int getColumns()
Returns:

getPlayerCount

public int getPlayerCount()
Returns:

setPlayerCount

public void setPlayerCount(int i)
Parameters:
i -

setDescription

public void setDescription(String string)
Parameters:
string -

setName

public void setName(String string)
Parameters:
string -

getPositionFromIndex

public org.eclipse.swt.graphics.Point getPositionFromIndex(int index)

getIndexFromPosition

public int getIndexFromPosition(int column,
                                int row)

getTileBounds

public org.eclipse.swt.graphics.Rectangle getTileBounds(int index)

getTileBounds

public org.eclipse.swt.graphics.Rectangle getTileBounds(int column,
                                                        int row)

getNeighboringIndexes

public int[] getNeighboringIndexes(int index)


Copyright © Gnome Korea. All Rights Reserved.