diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..44176da Binary files /dev/null and b/.DS_Store differ diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e41799..c3b2789 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,5 +2,5 @@ ## VER: Alpha #8 ## What's new? -- Added an update to the UserBase model to add weapons, pickaxes, and upgrades to the users inventory +- Updated the UserModel class to remove the ability to have weapons, upgrades, & pickaxes. - Started work on the load_options functions that will allow the user to choose specific options for the game diff --git a/api/sql.py b/api/sql.py index e0b47f4..9fe9f15 100644 --- a/api/sql.py +++ b/api/sql.py @@ -1,6 +1,5 @@ # Imports from typing import Annotated -from typing import List from fastapi import Depends from sqlmodel import Field, Session, SQLModel, create_engine from pydantic import BaseModel @@ -10,9 +9,6 @@ class HeroBase(SQLModel): name: str gold: int | None = Field(default=0) health: int | None = Field(default=100) - weapons: List[str] | None = Field(default=["basic_sword"]) - pickaxe: List[str] | None = Field(default=["basic_pickaxe"]) - upgrades: List[str] | None = Field(default=[]) # The main hero class. It inherits the name, gold, and health class Hero(HeroBase, table=True): diff --git a/functions.py b/functions.py index 2ba613e..7b9345d 100644 --- a/functions.py +++ b/functions.py @@ -18,7 +18,7 @@ def create_account(name: str, email: str, password: str) -> Any | None: else: return False -def login(email, password): +def login(email: str, password: str): data = { "email": email, "password": password @@ -35,9 +35,12 @@ def login(email, password): def load_options() -> int: print(""" Here are the available options: -* To select an option just enter its number * -1. Home - View the inventory +* To select an option, just enter its number * +1. Home - View the inventory, Save Progress, or View gold and health, Quit +2. Cave - Mine for gold +3. Shop - Buy weapons, pickaxes, or upgrades +4. Arena - Fight monsters for more gold. """) option = int(input("")) - return option \ No newline at end of file + return option diff --git a/main.py b/main.py index 7b5c365..0ca7c4f 100644 --- a/main.py +++ b/main.py @@ -1,8 +1,9 @@ +# Imports from functions import * import requests - +# The user object user = None # Does the user have an active account? @@ -35,4 +36,7 @@ else: while user is not None: print(f"Welcome {user['name']}!") - break \ No newline at end of file + options = load_options() + + print(options) + break