package com.dairymoose.modernlife.blocks.gui.chess;

/* loaded from: outputsrg.jar:com/dairymoose/modernlife/blocks/gui/chess/RookPiece.class */
public class RookPiece extends Piece {
    @Override // com.dairymoose.modernlife.blocks.gui.chess.Piece
    public boolean canMove(int x, int y) {
        int xDiff = x - this.f9x;
        int yDiff = y - this.f10y;
        if (((xDiff != 0 && yDiff == 0) || (yDiff != 0 && xDiff == 0)) && !wouldCollide(x, y)) {
            return canDoMove(x, y);
        }
        return false;
    }

    @Override // com.dairymoose.modernlife.blocks.gui.chess.Piece
    public int getId() {
        return PieceIds.ROOK.ordinal();
    }
}
