コード例 #1
0
ファイル: movebox.cpp プロジェクト: esaye/quackle
void MoveBox::positionChanged(const Quackle::GamePosition &position)
{
	if (m_rack.tiles() != position.currentPlayer().rack().tiles())
	{
		for (QMap<Quackle::Move, QTreeWidgetItem *>::iterator mapIt = m_moveMap.begin(); mapIt != m_moveMap.end(); ++mapIt)
			delete mapIt.value();

		m_moveMap.clear();
	}

	m_rack = position.currentPlayer().rack();
	setMoves(position.moves(), position.moveMade());
}
コード例 #2
0
void GraphicalBoardFrame::positionChanged(const Quackle::GamePosition &position)
{
    m_board = position.board();
    m_rack = position.currentPlayer().rack();
    m_ignoreRack = !position.currentPlayer().racksAreKnown();

    m_board.updateBritishness();

    resetArrow();
    m_candidate = position.moveMade();

    prepare();
}
コード例 #3
0
ファイル: boarddisplay.cpp プロジェクト: cdhowie/Quackle
void BoardWithQuickEntry::positionChanged(const Quackle::GamePosition &position)
{
	View::positionChanged(position);
	setLocalCandidate(position.moveMade());
}