示例#1
0
bool Field::InsertCellObject(std::shared_ptr<CellObject> object, const size_t x, const size_t y) {
	std::shared_ptr<FieldCell> cell = GetCell(x, y);
	Application *gui = Application::GetInstance();
	if (cell->IsEmpty()){
		cell->SetObject(object);
		gui->CreateObject(object, x, y);
		return true;
	}
	else {
		return false;
	}
}