You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.2 KiB

2 years ago
"""
Tu t'es fait plaisir ?!?
Note : 10 / 10
"""
2 years ago
from game.personnage import *
from game.core import Game
import graphics.layers as layers
from graphics.engine import Screen
import graphics.key_listener as listener
2 years ago
from util.sqlite import Connection
2 years ago
2 years ago
from time import sleep
if __name__ == "__main__":
2 years ago
conn = Connection()
conn.db.execute(
2 years ago
"""CREATE TABLE IF NOT EXISTS personnages (
2 years ago
id INTEGER PRIMARY KEY AUTOINCREMENT,
nom VARCHAR(50) NOT NULL,
pdv INTEGER NOT NULL,
exp INTEGER NOT NULL,
cat VARCHAR(50) NOT NULL,
expcoef INTEGER NOT NULL
2 years ago
)""")
2 years ago
conn.db.execute(
"""CREATE TABLE IF NOT EXISTS inventaire (
2 years ago
personnage_id INTEGER,
2 years ago
slot INTEGER PRIMARY KEY AUTOINCREMENT,
2 years ago
item_type VARCHAR(50) NOT NULL,
FOREIGN KEY (personnage_id) REFERENCES personnages(id)
UNIQUE (personnage_id, slot)
2 years ago
)""")
conn.close()
2 years ago
#Initialise la partie graphique
game = Game()
screen = Screen(game)
layers.StartPopUp(1)
layers.GUI(2)
listener.build_thread(screen).start()
while True:
screen.draw()
sleep(0.4)