]> gitweb.factorcode.org Git - factor.git/blob - extra/logic/examples/hanoi2/hanoi2-tests.factor
Switch to https urls
[factor.git] / extra / logic / examples / hanoi2 / hanoi2-tests.factor
1 ! Copyright (C) 2019-2020 KUSUMOTO Norio.
2 ! See https://factorcode.org/license.txt for BSD license.
3 USING: io.streams.string multiline logic lists
4 logic.examples.hanoi2 sequences tools.test ;
5
6 {
7     t [=[ move Top from Left to Center
8 move 2nd from Left to Right
9 move Top from Center to Right
10 move Base from Left to Center
11 move Top from Right to Left
12 move 2nd from Right to Center
13 move Top from Left to Center
14 ]=] } [
15     [
16         { hanoi L{ "Base" "2nd" "Top" } "Left" "Center" "Right" } query
17     ] with-string-writer
18 ] unit-test