Commit 5fea06f8 authored by Oskar Skog's avatar Oskar Skog

Test 0.4.14: minor curses IO changes; README: new account: [email protected]

parent 29bcdf83
2016-12-28 Oskar Skog <[email protected]>
0.4.14
* anonymine.py (curses_game (print_char)), cursescfg: Allow non ASCII
textics on Python3.
* anonymine.py (input): Don't redraw the window every time there has
been a non flagging and non revealing mouse events.
* README: New account [email protected]:2222
* cursescfg:
- The `pair` index of the tuples has since long been removed.
- Advice users to scroll at the edges when using the mouse.
- BUTTON1 and BUTTON3 comment
- Unicode support comments.
2016-12-25 Oskar Skog <[email protected]>
0.4.13
* anonymine_fields.py (generic_field.reveal): Use a loop instead of
......
......@@ -15,7 +15,7 @@
NAME := anonymine
NAME_C := Anonymine
DESCRIPTION = Minesweeper without guessing
VERSION := 0.4.13
VERSION := test-0.4.14
# Four more variables are required: sysconfdir, vargamesdir, EXECUTABLES and
# MODULES
......
......@@ -10,10 +10,8 @@ Apart from being solvable without guessing, Anonymine has a few other features:
- The anonymine_solver module can also be used to "measure the difficulty"
of a field.
You can also try it over SSH as [email protected]:2222 with
password "anonymine".
Ie. User "anonymine", password "anonymine", host "anonymine-demo.oskog97.com",
port "2222".
You can also try it over SSH as [email protected] port 2222.
(No password)
You can find screenshots and more at https://oskog97.com/projects/anonymine/
......
......@@ -315,6 +315,7 @@ class curses_game():
self.window = curses.initscr()
curses.cbreak()
curses.noecho()
curses.meta(1)
self.window.keypad(True)
try:
self.old_cursor = curses.curs_set(0)
......@@ -568,7 +569,8 @@ class curses_game():
self.travel(engine.field, command)
elif command == 'toggle-attention':
self.attention_mode = not self.attention_mode
else:
elif ch != curses.KEY_MOUSE:
# Don't do this all the time, that'd be a little wasteful.
self.window.redrawwin()
def travel(self, field, direction):
......@@ -650,7 +652,7 @@ class curses_game():
# curses_output_cfg may raise KeyError
if char is None:
char = cfg_char
self.window.addch(real_y, real_x, ord(char), attributes)
self.window.addstr(real_y, real_x, char, attributes)
def print_digit(self, x, y, digit):
'''Print a digit at a virtual coordinate.
......
......@@ -19,6 +19,8 @@
{
'curses-mouse-input': {
# BUTTON1 = Left
# BUTTON3 = Right (right is not 2)
'interval': 0, # Maximum time between PRESSED and RELEASED in
# order to count the two as a CLICK.
# A high value requires waiting between presses
......@@ -29,6 +31,7 @@
},
'curses-input': {
# Key bindings:
# Only ASCII characters are supported in the key bindings.
'flag': ['f', ],
'reveal': [' ', '\n', ],
'toggle-attention': ['!', '?', ],
......@@ -73,7 +76,8 @@
''',
'doc-hex': '''
You can also use the mouse, but be careful when clicking near the edge
of the terminal.
of the terminal. You can scroll the wheel while hovering over a cell
to move the "cell pointer" there, I'd suggest you do this at the edges.
This mode lacks an obvious up or down.
w e y u 7 9
......@@ -85,7 +89,7 @@
# Textics
# =======
#
# 'key': (pair, 'C', 'foreground', 'background', attributes),
# 'key': ('C', 'foreground', 'background', attributes),
# Keys
# ----
......@@ -133,6 +137,10 @@
# [0]: character (Required by all keys except 'number', 'grid',
# 'text' and 'background'. For these three, the character
# will be ignored. ('background' is ignored due to a bug.))
# Non-ASCII characters are supported in Python 3, but not in
# Python 2. See http://bugs.python.org/issue18118
# If you have Python 3 and a supporting font, you could use
# '\u26f3' for the flags and '\u26ed' for the mines.
# [1]: foreground color; valid colors are: "BLACK", "BLUE",
# "GREEN", "CYAN", "RED", "MAGENTA", "YELLOW" and
# "WHITE".
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment