Implemented getPieceAt method