コード例 #1
0
FlowContextController::FlowContextController(FlowBoard *mother, QObject *parent)
    : QObject(parent),
      m_board(mother),
      m_stable(new FlowContext(mother, this)),
      m_beta(new FlowContext(mother, this)),
      m_previous_legal_color(-1)
{
    m_solver = new FlowSolver(m_board, this);
    connect(m_board, SIGNAL(boardLoaded(int)),
            this, SLOT(restart()));
    connect(m_stable, SIGNAL(contextRatioChanged(double)),
            this, SLOT(stableRatioChanged(double)));
    connect(m_beta, SIGNAL(contextRatioChanged(double)),
            this, SIGNAL(realTimeRatioChanged(double)));
    setCurrentColor(-1);
    setMoves(0);
}
コード例 #2
0
ファイル: movebox.cpp プロジェクト: esaye/quackle
void MoveBox::movesChanged(const Quackle::MoveList &moves)
{
	setMoves(moves, m_previousSelection);
}