+
+std::istream& operator>>(std::istream& is, Board& board) {
+ for (int i = 0; i < BOARD_SIZE; i++) {
+ if (!is.good()) {
+ is.setstate(std::istream::failbit);
+ break;
+ }
+ if (i > 0 && is.get() != ',') {
+ is.setstate(std::istream::failbit);
+ break;
+ }
+ int numeric;
+ is >> numeric;
+ board[i] = numeric;
+ }
+ return is;
+}