def __init__(self): self.model = modelController.ModelController() self.view = viewController.ViewController(self.model) self.keys = keysController.KeysController(self.model, self.view) conf = configparser.ConfigParser() conf.read('conf.ini') self.typeUI = '' if 'UserInterface' in conf: self.typeUI = conf['UserInterface']['Type']
def PythonServerResponse(self, itemName, m_date, openPrice, highPrice, lowPrice, currentPrice, volumn, tradingValue): self.myViewController = vc.ViewController() json_object = { "name": itemName, "일자": m_date, "시가": openPrice, "고가": highPrice, "저가": lowPrice, "현재가": currentPrice, "거래량": volumn, "거래대금": tradingValue } json_string = json.dumps(json_object) print(json_string)
import grapher import ai import viewController timeController = timeController.TimeController(1) scoreController = scoreController.ScoreController() gridController = gridController.GridController(scoreController) tileController = tileController.TileController(gridController) grapher = grapher.Grapher(scoreController) ai = ai.AI(gridController, scoreController, grapher) viewController = viewController.ViewController(gridController, timeController, scoreController, ai, grapher) cTile = tileController.getRandomTile() nTile = tileController.getRandomTile() viewController.setTile(cTile, nTile) while not viewController.abort: if timeController.timeEvent(): if viewController.aiState: move, rotate, rating = ai.makeMove(cTile) if not cTile.incY(): cTile.apply() if not gridController.checkForGameOver(): scoreController.tileReleased() cTile = nTile nTile = tileController.getRandomTile()
def __init__(self): print("자동매매 프로그램 클래스 입니다.") self.myDataModel = dm.DataModel() self.myViewController = vc.ViewController(self.myDataModel)
def __init__(self): self.model = modelController.ModelController() self.view = viewController.ViewController(self.model)