ChessnutMessage.parse constructor

ChessnutMessage.parse(
  1. List<int> message
)

Implementation

ChessnutMessage.parse(List<int> message) {
  if (message.length < 65) throw ChessnutMessageTooShortException(message);

  _length = 65;

  for (var i = 2; i < 34; i++) {
    _pieces.add(message[i] & 15);
    _pieces.add(message[i] >> 4);
  }
}