@Override
    protected boolean isValidNonDropMove(GameState state, int x, int y) {
        /* Checks to see if the target tile is at most one tile away. 
         * Then verifies if the target tile is within the board.
         * Then checks to see if the target tile can be moved into.
         * Then, checks to see if the King would be attacked after moving.
         */
        boolean validMove = Math.abs(this.x-x) < 2 && Math.abs(this.y-y) < 2 
                        && !(x < 0 || x > 8)
                        && !(y < 0 || y > 8)
                         && state.getPieceAt(x, y).getAllegiance() != this.allegiance;
        state.setPieceAt(this.x, this.y, new EmptyPiece(this.x, this.y));
        Piece tempRep = state.getPieceAt(x, y);
        state.setPieceAt(x, y, this);
        validMove = validMove && !state.isAttacked(x, y, -this.allegiance);
        state.setPieceAt(x, y, tempRep);
        state.setPieceAt(this.x, this.y, this);
        return validMove;
    }