INNER CODE UNIT · Swift

finishGame

MultiCraft/MultiCraft · Apple/MultiCraft/MultiCraft/AppLogic.swift:36

public func finishGame(msg: UnsafePointer<CChar>) -> Never {
	AppLogic.log(message: String(cString: msg))

	DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
		NSApplication.shared.terminate(nil)
	}

	// run the run loop to ensure the app doesn't exit prematurely
	while true {
		RunLoop.current.run(until: Date.distantFuture)
	}
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…