/* Creates a move when playing in console mode. Also determines it's legality. */ Move createMove(Board *brd, int from, int to, int cap, int prom, char castling) { Move move; move.from = from; move.to = to; move.capture = cap; move.promotion = prom; move.castling = castling; if(!makeMove(brd,move)) move.from = 0; cancelMove(brd); return move; }
// private QVariant kpAbstractSelectionTool::operationMove (Operation op, const QVariant &data1, const QVariant &data2) { (void) data1; (void) data2; switch (op) { case HaventBegunDrawUserMessage: return /*virtual*/haventBegunDrawUserMessageMove (); case SetCursor: setCursorMove (); break; case BeginDraw: beginDrawMove (); break; case Draw: drawMove (currentPoint (), normalizedRect ()); break; case Cancel: cancelMove (); break; case EndDraw: endDrawMove (); break; default: Q_ASSERT (!"Unhandled operation"); break; } return QVariant (); }