void Board::moveStone(int moveid, int killid, int row, int col) { saveStep(moveid, killid, row, col, _steps); killStone(killid); moveStone(moveid, row, col); }
int Action::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: nextStep(); break; case 1: preStep(); break; case 2: saveStep((*reinterpret_cast< GenericStep*(*)>(_a[1]))); break; case 3: { bool _r = close(); if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; } break; default: ; } _id -= 4; } return _id; }
void FaToDFA::setMode(Algorithm::modes _mode) { mode = _mode; play_timer->stop(); num = 0; actInstruction=HEADER; prewInstruction=HEADER; clearActInstruction(); clearVariables(); // because show correct solution break connectiom betwen user FA and user FA widget connect(dfa_widget,SIGNAL(FA_changed(FiniteAutomata*)),this,SLOT(setDFA(FiniteAutomata*))); switch (mode) { case PLAY_MODE: algorithm_widget->enableNext(); algorithm_widget->disablePrev(); dfa_widget->setFA(new FiniteAutomata()); //unselect instruction from algorithm window clearActInstruction(); history.clear(); actPos = 0; actInstruction = HEADER; //init start instruction because new regExp may appeare when pres step mode was in run saveStep(); break; case CHECK_MODE: case STEP_MODE: correct_FA = computeSolution(); break; case NONE: break; } if(mode == STEP_MODE) check_step_timer->start(CHECK_STEP_TIMEOUT); else check_step_timer->stop(); dfa_widget->clearStatus(); }