diff --git a/.docker/settings.py b/.docker/settings.py index 9087854..43af422 100644 --- a/.docker/settings.py +++ b/.docker/settings.py @@ -9,7 +9,6 @@ from hopper.models.config import ( Settings, WSServerSettings, ) -from hopper.models.product import Product settings = Settings( game=GameSettings(), @@ -21,14 +20,6 @@ settings = Settings( inacivity_watchdog=InactivityWatchdogSettings(), purchase_timeout=5, log_level=logging.INFO, - products=[ - Product(name="CocaCola", id="cocacola-id"), - Product(name="Pepsi", id="pepsi-id"), - Product(name="Fanta", id="fanta-id"), - Product(name="Snickers", id="snickers-id"), - Product(name="Mars", id="mars-id"), - Product(name="Burek", id="burek-id"), - ], ws_server=WSServerSettings( HOST="0.0.0.0", PORT=int(os.environ.get("FAIRHOPPER_WS_PORT", 8011)), diff --git a/api_tests/requests.http b/api_tests/requests.http index d84efb9..1749426 100644 --- a/api_tests/requests.http +++ b/api_tests/requests.http @@ -34,13 +34,6 @@ POST http://localhost:8010/player/test-player-pero/move/up POST http://localhost:8010/player/test-player-pero/move/down ### -# purchase product -POST http://localhost:8010/player/test-player-pero/product/purchase -Content-Type: application/json - -{ - "product_id": "cocacola-id" -} ### # move Mirko left diff --git a/frontend/index.html b/frontend/index.html index c836545..49fa3c2 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -22,15 +22,6 @@

FairHopper Visualisation Client

-
-
-

- Product selection -

-

-
-
-
diff --git a/frontend/styles.css b/frontend/styles.css index c1b0fff..af17410 100644 --- a/frontend/styles.css +++ b/frontend/styles.css @@ -18,7 +18,7 @@ main.main-container { padding-bottom: 2px; } .flex-grid:last-of-type { - padding-bottom: 0px; + padding-bottom: 0; } .cell { @@ -56,44 +56,3 @@ ul.players { border-style: solid; border-color: darkred transparent transparent transparent; } - -.purchase-container { - width: 50vw; - position: fixed; - top: 200px; - left: 50%; - padding: 20px; - transform: translateX(-50%); - background-color: darkred; - z-index: 999; - border-radius: 10px; -} - -.purchase-container .header { - color: white; - margin-bottom: 20px; -} - -.purchase-container .header .countdown { - margin-left: auto; -} - -.purchase-container .products-content { - display: grid; - grid-gap: 10px; - grid-template-columns: 1fr 1fr 1fr; -} - -.purchase-container .products-content .product.selected { - background-color: pink; -} - -.purchase-container .products-content .product .card-title { - text-align: center; - font-size: 12pt; -} - -.purchase-container .products-content .product img { - margin: 20px; - max-height: 300px; -} diff --git a/hopper/models/config.py b/hopper/models/config.py index 17aa091..dda767f 100644 --- a/hopper/models/config.py +++ b/hopper/models/config.py @@ -3,7 +3,6 @@ from dataclasses import dataclass from typing import List, Optional from hopper.models.player import Player -from hopper.models.product import Product @dataclass @@ -46,5 +45,4 @@ class Settings: ws_server: WSServerSettings purchase_timeout: int = 10 # seconds log_level: int = logging.INFO - products: List[Product] = None debug: Optional[DebugSettings] = None diff --git a/hopper/models/product.py b/hopper/models/product.py deleted file mode 100644 index 3581efa..0000000 --- a/hopper/models/product.py +++ /dev/null @@ -1,10 +0,0 @@ -import uuid -from dataclasses import dataclass, field -from typing import Optional - - -@dataclass -class Product: - name: str - id: str = field(default_factory=lambda: str(uuid.uuid4())) - description: Optional[str] = None diff --git a/settings_template.py b/settings_template.py index 03b0f2a..27f18f3 100644 --- a/settings_template.py +++ b/settings_template.py @@ -9,7 +9,6 @@ from hopper.models.config import ( WSServerSettings, ) from hopper.models.player import Player, Position -from hopper.models.product import Product settings = Settings( game=GameSettings(), @@ -21,14 +20,6 @@ settings = Settings( inacivity_watchdog=InactivityWatchdogSettings(), purchase_timeout=5, log_level=logging.INFO, - products=[ - Product(name="CocaCola", id="cocacola-id"), - Product(name="Pepsi", id="pepsi-id"), - Product(name="Fanta", id="fanta-id"), - Product(name="Snickers", id="snickers-id"), - Product(name="Mars", id="mars-id"), - Product(name="Burek", id="burek-id"), - ], ws_server=WSServerSettings(), debug=DebugSettings( PRINT_BOARD=True,