private Piece deletePiece(Piece list, int x, int y, Move m) {
        if (list.x == x && list.y == y) {
            m.captured_piece = list;
            return list.next;
        }
        Piece old = list;
        for (Piece p = list.next; p != null; p = p.next) {
            if (p.x == x && p.y == y) {
                m.captured_piece = p;
                old.next = p.next;
                return list;
            }
            old = p;
        }
        if ( m.captured_piece == null )
          System.out.println("Piece not found");
        return list;
    }