int main() { uart_init(); char in[40]; // input buffer while(1) { if(!gameStarted) intro(); unsigned int theGuess = randInt(lowerBound, upperBound); guess(theGuess); read_echo(in); if(in[0] == 'h') lowerBound = theGuess; else if(in[0] == 'l') upperBound = theGuess; else if(in[0] == 'y') { printLine("I win"); gameStarted = 0; printLine("press any key to continue..."); uart_receive(); } else if(isReset(in)) { gameStarted = false; printLine("press any key to continue..."); uart_receive(); } } }
void CounterNode::remove () { if (m_parent) m_parent->removeChild(this); else { Q_ASSERT(isReset()); Q_ASSERT(!firstChild()); Q_ASSERT(!lastChild()); } }
short ElemDDLSGOptions::genSGA(SequenceGeneratorAttributes &sga) { sga.setSGStartValue(getStartValue()); sga.setSGIncrement(getIncrement()); sga.setSGMinValue(getMinValue()); sga.setSGMaxValue(getMaxValue()); sga.setSGCache(getCache()); sga.setSGCycleOption(isCycle()); sga.setSGFSDataType(getFSDataType()); sga.setSGResetOption(isReset()); return 0; }