Ejemplo n.º 1
0
 public static Tetrimino ByPosition(TetriminoKind kind, Position position, Direction facingDirection)
 {
     return(new Tetrimino(kind,
                          position,
                          TetriminoHelper.GetFirstBlockPositionByPosition(position, kind, facingDirection),
                          facingDirection));
 }
Ejemplo n.º 2
0
 private Tetrimino(TetriminoKind kind, Position position, Position firstBlockPosition, Direction facingDirection)
 {
     Kind               = kind;
     Position           = position;
     FacingDirection    = facingDirection;
     FirstBlockPosition = firstBlockPosition;
     Blocks             = TetriminoHelper.CreateOffsetedBlocks(kind, Position, facingDirection);
 }