-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpractise.py
28 lines (23 loc) · 823 Bytes
/
practise.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import curses
from curses import wrapper
import queue
import time
maze = [
["#", "O", "#", "#", "#", "#", "#", "#", "#"],
["#", " ", " ", " ", " ", " ", " ", " ", "#"],
["#", " ", "#", "#", " ", "#", "#", " ", "#"],
["#", " ", "#", " ", " ", " ", "#", " ", "#"],
["#", " ", "#", " ", "#", " ", "#", " ", "#"],
["#", " ", "#", " ", "#", " ", "#", " ", "#"],
["#", " ", "#", " ", "#", " ", "#", "#", "#"],
["#", " ", " ", " ", " ", " ", " ", " ", "#"],
["#", "#", "#", "#", "#", "#", "#", "X", "#"]
]
def main(stdscr):
# curses.init_pair(id,foreground_color,background_color)
curses.init_pair(1,curses.COLOR_BLUE,curses.COLOR_RED)
blue_and_balck=curses.color_pair(1)
stdscr.clear()
stdscr.addstr(5,5,"hello world!",blue_and_balck)
stdscr.getch()
wrapper(main)