system
クラス Field

java.lang.Object
  上位を拡張 system.Field

public final class Field
extends java.lang.Object

フィールドの管理,更新を行うクラス 全体のGameInfoが持ちます


コンストラクタの概要
Field(int fieldSeed, int width, int height, GameInfo gameInfo)
          を指定してインスタンスを生成します
 
メソッドの概要
 java.util.List<Point> getAllFireArea()
          全ての爆弾の持つ火柱の座標のリストを返します
 Bomb getBombAt(int x, int y)
          指定の座標にある爆弾を返します 無い場合はnullを返します
 Bomb getBombAt(Point point)
           
 java.util.List<Bomb> getBombList()
          存在する爆弾のリストを返します
 FieldState getFieldStateAt(int x, int y)
          指定した座標のFieldStateを返します 座標がフィールド範囲外の場合nullを返します
 FieldState getFieldStateAt(Point point)
           
 int getHeight()
          フィールドの高さを返します
 Item getItemAt(int x, int y)
          その座標のアイテムを返します 無い場合はnullを返します
 Item getItemAt(Point point)
          その座標のアイテムを返します 無い場合はnullを返します
 java.util.List<Item> getItemList()
          アイテムのリストを返します
 int getWidth()
          フィールドの幅を返します
 boolean hasBombAt(int x, int y)
          その座標に爆弾が存在するかどうかを返します
 boolean hasBombAt(Point point)
           
 boolean hasItemAt(int x, int y)
          その座標にアイテムがあるかどうかを返します
 boolean hasItemAt(Point point)
           
 boolean isFiredAt(int x, int y)
          指定した座標が火柱の場合trueを返します
 boolean isFiredAt(Point point)
           
 boolean isWalkableAt(int x, int y)
          その座標が歩ける状態であるかどうかを返します
 boolean isWalkableAt(PlayerInfo playerInfo, Direction direction)
          プレイヤーがdirectionのほうへ進むことができるかどうかを返します
 boolean isWalkableAt(Point point)
           
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

Field

public Field(int fieldSeed,
             int width,
             int height,
             GameInfo gameInfo)
を指定してインスタンスを生成します

パラメータ:
fieldSeed -
width -
height -
メソッドの詳細

isWalkableAt

public boolean isWalkableAt(PlayerInfo playerInfo,
                            Direction direction)
プレイヤーがdirectionのほうへ進むことができるかどうかを返します

パラメータ:
playerInfo -
direction -
戻り値:

isWalkableAt

public boolean isWalkableAt(int x,
                            int y)
その座標が歩ける状態であるかどうかを返します

パラメータ:
x -
y -
戻り値:

isWalkableAt

public boolean isWalkableAt(Point point)

getFieldStateAt

public FieldState getFieldStateAt(int x,
                                  int y)
指定した座標のFieldStateを返します 座標がフィールド範囲外の場合nullを返します

パラメータ:
x -
y -
戻り値:

getFieldStateAt

public FieldState getFieldStateAt(Point point)

getWidth

public int getWidth()
フィールドの幅を返します

戻り値:

getHeight

public int getHeight()
フィールドの高さを返します

戻り値:

getItemList

public java.util.List<Item> getItemList()
アイテムのリストを返します

戻り値:

getItemAt

public Item getItemAt(int x,
                      int y)
その座標のアイテムを返します 無い場合はnullを返します

パラメータ:
x -
y -
戻り値:

getItemAt

public Item getItemAt(Point point)
その座標のアイテムを返します 無い場合はnullを返します

パラメータ:
point -
戻り値:

hasItemAt

public boolean hasItemAt(int x,
                         int y)
その座標にアイテムがあるかどうかを返します

パラメータ:
x -
y -
戻り値:

hasItemAt

public boolean hasItemAt(Point point)

getBombList

public java.util.List<Bomb> getBombList()
存在する爆弾のリストを返します

戻り値:

hasBombAt

public boolean hasBombAt(int x,
                         int y)
その座標に爆弾が存在するかどうかを返します

パラメータ:
x -
y -
戻り値:

hasBombAt

public boolean hasBombAt(Point point)

getBombAt

public Bomb getBombAt(int x,
                      int y)
指定の座標にある爆弾を返します 無い場合はnullを返します

戻り値:

getBombAt

public Bomb getBombAt(Point point)

getAllFireArea

public java.util.List<Point> getAllFireArea()
全ての爆弾の持つ火柱の座標のリストを返します

戻り値:

isFiredAt

public boolean isFiredAt(int x,
                         int y)
指定した座標が火柱の場合trueを返します

パラメータ:
x -
y -
戻り値:

isFiredAt

public boolean isFiredAt(Point point)