2020-03-01 04:19:07 -05:00
|
|
|
! Copyright (C) 2019-2020 KUSUMOTO Norio.
|
|
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
2020-03-03 07:04:46 -05:00
|
|
|
USING: tools.test logic lists logic.examples.hanoi2
|
2020-03-01 04:19:07 -05:00
|
|
|
formatting sequences ;
|
2020-03-03 07:04:46 -05:00
|
|
|
IN: logic.examples.hanoi2.tests
|
2020-03-01 04:19:07 -05:00
|
|
|
|
|
|
|
|
{ t } [
|
|
|
|
|
{
|
|
|
|
|
"The following statements will be printed:"
|
|
|
|
|
"move Top from Left to Center"
|
|
|
|
|
"move 2nd from Left to Right"
|
|
|
|
|
"move Top from Center to Right"
|
|
|
|
|
"move Base from Left to Center"
|
|
|
|
|
"move Top from Right to Left"
|
|
|
|
|
"move 2nd from Right to Center"
|
|
|
|
|
"move Top from Left to Center"
|
|
|
|
|
" "
|
|
|
|
|
} [ "%s\n" printf ] each
|
|
|
|
|
{ hanoi L{ "Base" "2nd" "Top" } "Left" "Center" "Right" } query
|
|
|
|
|
] unit-test
|