예제 #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
void BoardWithQuickEntry::positionChanged(const Quackle::GamePosition &position)
{
	View::positionChanged(position);
	setLocalCandidate(position.moveMade());
}