private int square(Piece[][] pieces, int from_x, int from_y, int to_x, int to_y) {
        
        if((to_x == from_x && Math.abs(to_y - from_y) == 1 || to_y == from_y && Math.abs(to_x - from_x) == 1 || Math.abs(to_x - from_x) == 1 && Math.abs(to_y - from_y) == 1) && (isOccupiedByAnOpponent(pieces[to_x][to_y]) || isEmpty(pieces[to_x][to_y]))) {
            if(isOccupiedByAnOpponent(pieces[to_x][to_y])) {
                last_move_info = "Kx" + (char)(((int)'a') + to_y) + "" + (8 - to_x) + " ";
            }
            else {
                last_move_info = "K" + (char)(((int)'a') + to_y) + "" + (8 - to_x) + " ";
            }
            
            pieces[to_x][to_y] = pieces[from_x][from_y];
            pieces[from_x][from_y] = null;

            return MOVED;
        }
        
        return NOT_MOVED;
        
    }