Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
67f953c5
Commit
67f953c5
authored
Nov 26, 2010
by
Senthil Kumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
s/colour/color/g
parent
31717e8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Demo/curses/life.py
Demo/curses/life.py
+3
-3
No files found.
Demo/curses/life.py
View file @
67f953c5
#!/usr/bin/env python3
# life.py -- A curses-based version of Conway's Game of Life.
# Contributed by AMK
# Mouse support and colo
u
r by Dafydd Crosby
# Mouse support and color by Dafydd Crosby
#
# An empty board will be displayed, and the following commands are available:
# E : Erase the board
...
...
@@ -148,7 +148,7 @@ def display_menu(stdscr, menu_y):
"Display the menu of possible keystroke commands"
erase_menu
(
stdscr
,
menu_y
)
# If colo
u
r, then light the menu up :-)
# If color, then light the menu up :-)
if
curses
.
has_colors
():
stdscr
.
attrset
(
curses
.
color_pair
(
1
))
stdscr
.
addstr
(
menu_y
,
4
,
...
...
@@ -164,7 +164,7 @@ def keyloop(stdscr):
menu_y
=
(
stdscr_y
-
3
)
-
1
display_menu
(
stdscr
,
menu_y
)
# If colo
u
r, then initialize the color pairs
# If color, then initialize the color pairs
if
curses
.
has_colors
():
curses
.
init_pair
(
1
,
curses
.
COLOR_BLUE
,
0
)
curses
.
init_pair
(
2
,
curses
.
COLOR_CYAN
,
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment