Base stuff for actual game
This commit is contained in:
8
.vscode/settings.json
vendored
Normal file
8
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"files.exclude": {
|
||||
".gitignore": true,
|
||||
"LICENSE": true,
|
||||
"README.md": true,
|
||||
".vscode/": true
|
||||
}
|
||||
}
|
||||
3
data/cat.py
Normal file
3
data/cat.py
Normal file
@@ -0,0 +1,3 @@
|
||||
class Cat:
|
||||
def __init__(self, name):
|
||||
self.name = name
|
||||
32
game.py
Normal file
32
game.py
Normal file
@@ -0,0 +1,32 @@
|
||||
from data.cat import Cat
|
||||
from systems.ui import clear, title
|
||||
from systems.world import shelter
|
||||
import questionary
|
||||
|
||||
|
||||
class Game:
|
||||
def __init__(self):
|
||||
self.cat = None
|
||||
|
||||
def new_game(self):
|
||||
self.cat = shelter()
|
||||
self.game_loop()
|
||||
|
||||
def game_loop(self):
|
||||
# TODO: make
|
||||
pass
|
||||
|
||||
def run(self):
|
||||
title()
|
||||
print("Welcome to Whiskerbound!")
|
||||
choice = questionary.select("", choices=["New Game", "Quit"]).ask()
|
||||
|
||||
if choice == "New Game":
|
||||
self.new_game()
|
||||
elif choice == "Quit":
|
||||
quit()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
game = Game()
|
||||
game.run()
|
||||
10
systems/ui.py
Normal file
10
systems/ui.py
Normal file
@@ -0,0 +1,10 @@
|
||||
import os
|
||||
|
||||
|
||||
def clear():
|
||||
os.system("cls" if os.name == "nt" else "clear")
|
||||
|
||||
|
||||
def title():
|
||||
clear()
|
||||
print("=== Whiskerbound ===\n")
|
||||
7
systems/world.py
Normal file
7
systems/world.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from data.cat import Cat
|
||||
|
||||
|
||||
def shelter():
|
||||
# TODO: make
|
||||
name = input("Name your cat: ")
|
||||
return Cat(name)
|
||||
Reference in New Issue
Block a user