hw5-6 add method setPieceByPosition