public class Block_S extends Block
Constructor and Description |
---|
Block_S(java.lang.String color,
int rotation)
Konstruktor
|
Modifier and Type | Method and Description |
---|---|
Board |
rotateLeft(Board board)
rotiert den Block nach links
|
Board |
rotateRight(Board board)
rotiert den Block nach rechts
|
canInsert, canMoveDown, canMoveLeft, canMoveRight, collidesWithBorder, collidesWithLeftBorder, collidesWithRightBorder, getColor, getPoints, insertBlock, isFixed, moveDown, moveLeft, moveRight, toString
public Block_S(java.lang.String color, int rotation)
color
- String - Farbe des Blocks (Hexcode)rotation
- int - Rotation des Blocks (0 = 0°, 1 = 90°, 2 = 180°, 3 = 270°)public Board rotateLeft(Board board)
rotateLeft
in class Block
board
- Board - aktuelles Spielfeldpublic Board rotateRight(Board board)
rotateRight
in class Block
board
- Board - aktuelles Spielfeld