encodePiece :: Maybe ChessPiece -> Word8
encodePiece (Just (ChessPiece pType color))  =   fromIntegral(2 * fromEnum pType + fromEnum color + 1)
encodePiece :: Maybe ChessPiece -> Word8
encodePiece (Just (ChessPiece pType color))  =   fromIntegral(2 * fromEnum pType + fromEnum color + 1)
encodePiece (Just (ChessPiece pType color))  =   fromIntegral(2 * fromEnum pType + fromEnum color + 1)