def create_inventory_image(): context = DeckContext(request) deckController.updateAsInventory(context) filepath = deckController.createLargeDeckImage("", 10) return filepath
def create_enemy_deck_image(): context = DeckContext(request) if not deckController.updateAsEnemyDeck(context): return jsonify({"result": "no active battle data"}) return deckController.createLargeDeckImage("enemy_deck")
def enemy_deck_analyze(): context = DeckContext(request) if not deckController.updateAsEnemyDeck(context): print("No active battle data. Go attack someone!") return jsonify({"result": "no active battle data"}) deckController.findCombos() deck_path = deckController.createLargeDeckImage() combo_path = deckController.createLargeComboImage() stats = Stats("Stats", deckController) stats.calcStatData() stats.getSuggestions() if deck_path is None: print("No deck results to print.") return jsonify({"result": "No deck results to print."}) else: print("Deck image saved to {0}".format(deck_path)) if combo_path is None: print("No combo results to print.") return jsonify({"result": "No combo results to print."}) else: print("Combo image saved to {0}".format(combo_path)) stats.printToTerminal() return jsonify({"result": "no active battle data"})
def enemy_deck_print(): context = DeckContext(request) if not deckController.updateAsEnemyDeck(context): return jsonify({"result": "no active battle data"}) deckController.printDeck(context)
def deck_create_image(): context = DeckContext(request) shouldUpdateDeck = deckController.updateAsMyDeck(context) print('Update Deck: ', shouldUpdateDeck) # TODO: need a proper response here if not shouldUpdateDeck: return "No active battle data. Go attack someone!" return "Create Deck Image"