Browse Source

cli changements

old
Kalyax 2 years ago
parent
commit
3f46c54d8d
  1. 0
      charaters/Inventaire.py
  2. 3
      charaters/personnage.py
  3. 3
      cli/cli.py
  4. 4
      main.py

0
Inventaire.py → charaters/Inventaire.py

3
Personnage.py → charaters/personnage.py

@ -1,4 +1,3 @@
from enum import Enum
from random import randint from random import randint
class StatsSet(): class StatsSet():
@ -11,7 +10,7 @@ class StatsSet():
self.critrateP = critrateP self.critrateP = critrateP
self.xpcoef = xpcoef self.xpcoef = xpcoef
class ClassType(Enum): class ClassType:
GUERRIER = StatsSet(20, 10, 12, 5, 10, 8) GUERRIER = StatsSet(20, 10, 12, 5, 10, 8)
MAGICIEN = StatsSet(16, 12, 6, 8, 15, 7) MAGICIEN = StatsSet(16, 12, 6, 8, 15, 7)
#VOLEUR = #VOLEUR =

3
cli/cli.py

@ -62,11 +62,12 @@ class CLI:
if (x, y) in self.screen: if (x, y) in self.screen:
content += self.screen[(x, y)] content += self.screen[(x, y)]
else: else:
content += "a" content += " "
content += "\n" content += "\n"
print("\033[H\033[J", end="") print("\033[H\033[J", end="")
print(content) print(content)
if __name__ == "__main__":
cli = CLI() cli = CLI()
layer = Layer(cli.x, cli.y) layer = Layer(cli.x, cli.y)
layer.put_char("t", 5, 6, Colors.BLUEBG, Colors.BLACK) layer.put_char("t", 5, 6, Colors.BLUEBG, Colors.BLACK)

4
main.py

@ -0,0 +1,4 @@
from personnage import *
if __name__ == "__main__":
personnage = Personnage()
Loading…
Cancel
Save