Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Junkyardfreak

Pages: [1]
1
If someone could hand me their roguelike code I would be happy! (Using only bearlib)

2
Dangit, I'm so bad at this haha  :-\ And all I want is a simple roguelike base so I can work around it...

3
So, this function doesn't seems to work in bearlib, I can't move the '@' this way. Any tips?

Code: [Select]
def addchar():
char = '@'
x,y = 0,0
terminal.refresh()
terminal.put(x, y, char)
keymove = terminal.read()
if keymove == terminal.TK_UP:
x -= 1
elif keymove == terminal.TK_DOWN:
x += 1
elif keymove == terminal.TK_LEFT:
y -= 1
elif keymove == terminal.TK_RIGHT:
y += 1


return;

4
So, can someone share a code snippet of a simple menu program in python with a title and 2 options; one to print something and the other to exit the window? I was unable to find much info about the Python bindings. Thanks!

Pages: [1]