On 4/21/2016 7:10 PM, Ethan Furman wrote:
I do plan to incorporate a sanity test in each Piece class to validate
the initial position value. Pawns have 16 specific positions. Bishop,
Knight and Rook each have four specific positions. King and Queen each
have two specific positions. An invalid value will raise an exception.

This will make it so you cannot use your PieceFactory for custom setups.


The sanity check won't be in the PieceFactory, but in the Piece class as an interface and each Piece subclass will implement the correct positions for comparison.

Thank you,

Chris R.
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to