void Play() { CurrentBoardPosition=-1; MoveClassification=0; MoveAlreadyMadeFlag=0; Error=0; PieceError=0; if(MoveCycleNumber==1) { WhitePawnEnPassantFlag=0; BlackPawnEnPassantFlag=0; } while(Error==0) { PlayInputTranslate(); Castle(); Whitepawn(); ErrorSignal(); CHECKERROR BlackPawn(); ErrorSignal(); CHECKERROR PawnToQueen(); Rook(); ErrorSignal(); CHECKERROR Knight(); ErrorSignal(); CHECKERROR Bishop(); ErrorSignal(); CHECKERROR Queen(); ErrorSignal(); CHECKERROR King(); ErrorSignal(); CHECKERROR Etc(); ErrorSignal(); break; } }
void CSEQ::Seq(void) { // 간단히 처리되는 함수들... g_io.SetDO(oSmemaMachineReady, g_pNV->GetNDm(ndmSememaRdy)); g_pNV->SetNDm(ndmSememaRdy, FALSE); Etc(); g_Init.Card(); g_opBtn.Seq(); g_lampBuzzer.Seq(); g_door.Seq(); if(TRUE == g_opr.bEmg) return; if(!g_opr.bCardInit) { if(!g_Init.m_fsm.IsRun()) { g_Init.m_fsm.Set(C_RST_LIB_START); } return; } g_allHome.Seq(); //Tenkey Part g_tenkeyOpr.Seq(); // Part Cycle g_PRS.Cycle(); g_Disp.Cycle(); g_Stage.Cycle(); g_PPGantry.Cycle(); if(FALSE == g_opr.bStop) { if(FALSE == g_opr.bAutoRun) // STOP->RUN 초기활것들 { g_opr.bAutoRun = TRUE; g_PRS.m_bAuto = TRUE; g_Disp.m_bAuto = TRUE; g_PPGantry.m_bAuto = TRUE; g_Stage.m_bAuto = TRUE; g_io.SetDO(oPwrFeederCutter1, TRUE); g_io.SetDO(oPwrFeederCutter2, TRUE); } } else { if(TRUE == g_opr.bAutoRun) // RUN->STOP 상태 초기화 해야할것들. { g_PPGantry.m_bAuto = FALSE; g_PPGantry.m_bStopCycle = TRUE; g_PRS.m_bAuto = FALSE; g_PRS.m_bStopCycle = TRUE; g_Disp.m_bAuto = FALSE; g_Disp.m_bStopCycle = TRUE; g_Stage.m_bAuto = FALSE; g_Stage.m_bStopCycle = TRUE; g_PnP1.m_bAuto = FALSE; g_PnP2.m_bAuto = FALSE; g_io.SetDO(oPwrFeederCutter1, FALSE); g_io.SetDO(oPwrFeederCutter2, FALSE); if(!g_Stage.m_fsm.IsRun()) g_Stage.m_pMtConv1->Stop(FALSE); g_opr.bAutoRun = FALSE; } } if(FALSE == g_opr.bStop) { if(!g_door.m_bLock) return; } if(TRUE == g_opr.bPaused) return; g_PRS.Auto(); g_Disp.Auto(); g_PPGantry.Auto(); g_Stage.Auto(); }