public bool CanRotate(TetrisBoard board) { // Check if empty for each child foreach (Point p in RotatedPoints()) { if (!board.IsEmpty(Position + p)) { return(false); } } return(true); }
public bool CanMove(TetrisBoard board, Point direction) { // Check if empty for each child foreach (Entity e in Shape) { Point target = direction + Position + e.Position; if (!board.IsEmpty(direction + Position + e.Position)) { return(false); } } return(true); }