diff --git a/Inventaire.py b/charaters/Inventaire.py similarity index 100% rename from Inventaire.py rename to charaters/Inventaire.py diff --git a/Personnage.py b/charaters/personnage.py similarity index 97% rename from Personnage.py rename to charaters/personnage.py index e97c985..bccde6d 100644 --- a/Personnage.py +++ b/charaters/personnage.py @@ -1,4 +1,3 @@ -from enum import Enum from random import randint class StatsSet(): @@ -11,7 +10,7 @@ class StatsSet(): self.critrateP = critrateP self.xpcoef = xpcoef -class ClassType(Enum): +class ClassType: GUERRIER = StatsSet(20, 10, 12, 5, 10, 8) MAGICIEN = StatsSet(16, 12, 6, 8, 15, 7) #VOLEUR = diff --git a/cli/cli.py b/cli/cli.py index 474786b..fad9763 100644 --- a/cli/cli.py +++ b/cli/cli.py @@ -62,21 +62,22 @@ class CLI: if (x, y) in self.screen: content += self.screen[(x, y)] else: - content += "a" + content += " " content += "\n" print("\033[H\033[J", end="") print(content) -cli = CLI() -layer = Layer(cli.x, cli.y) -layer.put_char("t", 5, 6, Colors.BLUEBG, Colors.BLACK) -layer.put_string("""test""", 8, 9, Colors.BEIGEBG) - -cli.set_layer("test", layer) -##cli.put_char("t", 5, 6, Colors.BLUEBG, Colors.BLACK) -#cli.put_string("tttaaaaaa ttt \n ttttttttttnnnnnn t", 8, 9, Colors.BEIGEBG) -#cli.draw() +if __name__ == "__main__": + cli = CLI() + layer = Layer(cli.x, cli.y) + layer.put_char("t", 5, 6, Colors.BLUEBG, Colors.BLACK) + layer.put_string("""test""", 8, 9, Colors.BEIGEBG) -while True: - cli.draw() - sleep(1) \ No newline at end of file + cli.set_layer("test", layer) + ##cli.put_char("t", 5, 6, Colors.BLUEBG, Colors.BLACK) + #cli.put_string("tttaaaaaa ttt \n ttttttttttnnnnnn t", 8, 9, Colors.BEIGEBG) + #cli.draw() + + while True: + cli.draw() + sleep(1) \ No newline at end of file diff --git a/main.py b/main.py index e69de29..4c9198a 100644 --- a/main.py +++ b/main.py @@ -0,0 +1,4 @@ +from personnage import * + +if __name__ == "__main__": + personnage = Personnage() \ No newline at end of file