Closed barakmich closed 2 years ago
Sounds a bit confusing. Its name should be NewPiece
, doesn't it?
I have actually run into this myself using the package. A worthy addition. Thanks @barakmich . I used @bbars suggestion on naming to be compliant with typical NewXXX naming conventions.
Currently, there's no way to build a *chess.Piece from the constituent PieceType and Color... it's useful, as it exists in the package already, so it seems nice to make this helper function public.