29 lines
843 B
Python
29 lines
843 B
Python
|
#!/usr/bin/env python
|
||
|
from dungeonbattle.interfaces import Map
|
||
|
from dungeonbattle.display.mapdisplay import MapDisplay
|
||
|
from dungeonbattle.display.statsdisplay import StatsDisplay
|
||
|
from dungeonbattle.settings import Settings
|
||
|
from dungeonbattle.display.texturepack import TexturePack
|
||
|
from dungeonbattle.entities.player import Player
|
||
|
import curses
|
||
|
import time
|
||
|
|
||
|
def test(screen) :
|
||
|
s = Settings()
|
||
|
s.load_settings()
|
||
|
s.write_settings()
|
||
|
p = Player()
|
||
|
p.y = 1
|
||
|
p.x = 6
|
||
|
p.health = 15
|
||
|
p.intelligence = 4
|
||
|
p.charisma = 2
|
||
|
p.dexterity = 3
|
||
|
p.constitution = 4
|
||
|
m = Map.load("example_map2.txt")
|
||
|
MD = MapDisplay(m, TexturePack.ASCII_PACK, curses.LINES * 4//5, curses.COLS)
|
||
|
MD.display(p.y,p.x)
|
||
|
SD = StatsDisplay(p,curses.LINES * 1//5, curses.COLS, 0, curses.LINES * 4//5)
|
||
|
SD.refresh()
|
||
|
time.sleep(6)
|