diff --git a/extra/24-game/24-game-tests.factor b/extra/24-game/24-game-tests.factor new file mode 100644 index 0000000000..daa93cb225 --- /dev/null +++ b/extra/24-game/24-game-tests.factor @@ -0,0 +1,6 @@ + +USING: 24-game sequences tools.test ; + +IN: 24-game.tests + +{ t } [ make-24 first4 makes-24? ] unit-test diff --git a/extra/24-game/24-game.factor b/extra/24-game/24-game.factor index b834299ac4..de9cfbeafc 100644 --- a/extra/24-game/24-game.factor +++ b/extra/24-game/24-game.factor @@ -42,7 +42,7 @@ CONSTANT: (operators) { + - * / rot swap q } [ name>> = ] with find nip ; : get-operator ( operators -- word ) - "Operators: " write dup pprint nl + "Operators: " write dup pprint nl flush readln over find-operator dup [ "Command not found..." print get-operator ] unless nip ;