nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib/popcorn: StaticHandler use `default_file`
[nit.git]
/
examples
/
leapfrog
/
leapfrog_curses.nit
diff --git
a/examples/leapfrog/leapfrog_curses.nit
b/examples/leapfrog/leapfrog_curses.nit
index
826165c
..
da05bf8
100644
(file)
--- a/
examples/leapfrog/leapfrog_curses.nit
+++ b/
examples/leapfrog/leapfrog_curses.nit
@@
-105,7
+105,7
@@
redef class Duck
end
end
end
end
-redef class Scene
+redef class PlayScene
fun draw_on_curses(view: CursesView)
do
var window = view.window
fun draw_on_curses(view: CursesView)
do
var window = view.window
@@
-121,9
+121,9
@@
redef class Scene
sys.nanosleep(0, 48000000)
# Keyboard input
sys.nanosleep(0, 48000000)
# Keyboard input
- while stdin.as(Stdin).poll_in do
- if stdin.eof then return
- var c = stdin.read_char
+ while sys.stdin.poll_in do
+ if sys.stdin.eof then return
+ var c = sys.stdin.read_char
if c == 'q'.ascii then
self.exists = false
return
if c == 'q'.ascii then
self.exists = false
return
@@
-133,7
+133,7
@@
redef class Scene
end
end
end
end
-var game = new Scene
+var game = new PlayScene
var win = new Window
var main_view = new CursesView(win)
var win = new Window
var main_view = new CursesView(win)