|
|||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||
java.lang.Object
|
+--Model
|
+--Movable
|
+--Tetromino
テトロミノを表すクラス。4つのブロックによって構成される。
| フィールドの概要 | |
protected Block[] |
blocks
自分を構成するブロック |
private int |
cx
中心点のx座標 |
private int |
cy
中心点のy座標 |
(パッケージプライベート) static int |
NUM_BLOCKS
|
| コンストラクタの概要 | |
(パッケージプライベート) |
Tetromino()
|
(パッケージプライベート) |
Tetromino(int px,
int py)
|
| メソッドの概要 | |
(パッケージプライベート) void |
clear(java.awt.Graphics gr)
画面上で消す。 |
(パッケージプライベート) void |
clear(java.awt.Graphics gr,
int ofsX,
int ofsY)
|
java.lang.Object |
clone()
|
(パッケージプライベート) void |
draw(java.awt.Graphics gr)
描画する。 |
(パッケージプライベート) Block[] |
getBlocks()
|
(パッケージプライベート) int |
getX()
|
(パッケージプライベート) int |
getY()
|
(パッケージプライベート) void |
move(int mx,
int my)
ゲームの世界上で移動する。 |
(パッケージプライベート) void |
rotateL()
|
(パッケージプライベート) void |
rotateL(java.awt.Graphics gr)
|
(パッケージプライベート) void |
rotateR()
|
(パッケージプライベート) void |
rotateR(java.awt.Graphics gr)
|
(パッケージプライベート) void |
setBlocks(Block[] blks)
|
(パッケージプライベート) void |
setX(int x)
|
(パッケージプライベート) void |
setY(int y)
|
(パッケージプライベート) void |
view(java.awt.Graphics gr,
int ofsX,
int ofsY)
|
| クラス Movable から継承したメソッド |
move |
| クラス java.lang.Object から継承したメソッド |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| フィールドの詳細 |
static final int NUM_BLOCKS
private int cx
private int cy
protected Block[] blocks
| コンストラクタの詳細 |
Tetromino()
Tetromino(int px,
int py)
| メソッドの詳細 |
public java.lang.Object clone()
Movable 内の clonevoid setX(int x)
int getX()
void setY(int y)
int getY()
void setBlocks(Block[] blks)
Block[] getBlocks()
void move(int mx,
int my)
Movable の記述:
Movable 内の movemx - x方向の移動量my - y方向の移動量void draw(java.awt.Graphics gr)
Model の記述:
Model 内の drawgr - 描画対象
void view(java.awt.Graphics gr,
int ofsX,
int ofsY)
void clear(java.awt.Graphics gr)
Model の記述:
Model 内の cleargr - 描画対象
void clear(java.awt.Graphics gr,
int ofsX,
int ofsY)
void rotateR()
void rotateR(java.awt.Graphics gr)
void rotateL()
void rotateL(java.awt.Graphics gr)
|
|||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||