setSquare method

void setSquare(
  1. String square,
  2. bool state
)

Implementation

void setSquare(String square, bool state) {
  int sqIndex = CertaboProtocol.squares.indexOf(square.toLowerCase());
  if (sqIndex == -1) throw Exception("Square not found.");
  _pattern[sqIndex] = state;
}