24-game: flush output, add some tests.
parent
81e5c32225
commit
36c38b7c86
|
@ -0,0 +1,6 @@
|
||||||
|
|
||||||
|
USING: 24-game sequences tools.test ;
|
||||||
|
|
||||||
|
IN: 24-game.tests
|
||||||
|
|
||||||
|
{ t } [ make-24 first4 makes-24? ] unit-test
|
|
@ -42,7 +42,7 @@ CONSTANT: (operators) { + - * / rot swap q }
|
||||||
[ name>> = ] with find nip ;
|
[ name>> = ] with find nip ;
|
||||||
|
|
||||||
: get-operator ( operators -- word )
|
: get-operator ( operators -- word )
|
||||||
"Operators: " write dup pprint nl
|
"Operators: " write dup pprint nl flush
|
||||||
readln over find-operator dup
|
readln over find-operator dup
|
||||||
[ "Command not found..." print get-operator ] unless nip ;
|
[ "Command not found..." print get-operator ] unless nip ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue