chess piece draggable and prints array index