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.
|
|
|
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
|
|
|
|
|
|
|
|
from util.sqlite import Connection
|
|
|
|
|
|
|
|
from time import sleep
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
conn = Connection()
|
|
|
|
conn.db.execute(
|
|
|
|
"""CREATE TABLE IF NOT EXISTS personnages (
|
|
|
|
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
|
|
|
|
)""")
|
|
|
|
|
|
|
|
conn.db.execute(
|
|
|
|
"""CREATE TABLE IF NOT EXISTS inventaire (
|
|
|
|
personnage_id INTEGER PRIMARY KEY,
|
|
|
|
slot INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
|
|
nom VARCHAR(50) NOT NULL,
|
|
|
|
FOREIGN KEY(personnage_id) REFERENCES personnages(id)
|
|
|
|
)""")
|
|
|
|
conn.close()
|
|
|
|
|
|
|
|
#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)
|