Example #1
0
 def start_menu(self):
     from Classes.Menu import Menu
     pygame.font.init()
     game_screen = pygame.Surface((WIN_WIDHT, WIN_HEIGH))
     display = pygame.display.set_mode((WIN_WIDHT, WIN_HEIGH))  # создание окна
     screen = pygame.display.get_surface()
     clock = pygame.time.Clock()
     mn = Menu()
     mn.run()
Example #2
0
    def on_btn_back_to_menu(self):
        from Classes.Menu import Menu

        self.work = False
        num_snows_scroll = self.scrollbar.get_num()  # кол-во снежинок = значение снежинок на скроллинге
        wind_power = self.scrollbar_wind.get_num()
        print("from sc = ", num_snows_scroll)
        win_snow = Menu(num_snows_scroll, wind_power=wind_power)
        win_snow.run()
Example #3
0
File: run.py Project: kotland/Snow
from Classes.Menu import Menu

win = Menu()
win.run()
Example #4
0
    def on_btn_menu(self):
        from Classes.Menu import Menu

        self.work = False
        win_snow = Menu(background=self.background)
        win_snow.run()
Example #5
0
 def run_menu(self):
     self.app_state = 'menu'
     pygame.font.init()
     mn = Menu()
     mn.run()
Example #6
0
 def game_over(self):
     from Classes.Menu import Menu
     self.done = True
     menu = Menu()
     menu.run()
Example #7
0
from flask import Flask, request
from Classes.Menu import Menu
from Classes.Order import Order
from Classes.MenuItem import MenuItem
from Classes.Drink import Drink
from Classes.Pizza import Pizza
import json

menu_path = "Classes/Menu.json"

app = Flask("Assignment 2")

menu = Menu(menu_path)

# Store all the orders
all_orders = []


# Helper Functions:
def helper_add_to_order(order, json_data):
    # Get all the Drinks from the POST request and add them to the order

    try:
        if len(json_data["Drinks"]) > 0:
            for drink in json_data["Drinks"]:
                order_drink = Drink(drink)
                order.add_order_item(order_drink)
    except KeyError:
        pass

    try: