Explanation of this game by inventor : https://j344.exblog.jp/238344979/
- GHC
Compile ghc godomachi.hs
.
$ ./godomachi <n>
Analyze all combination of n-omino except same ones.
( n
> 8 : not tested )
Example:
$ ./godomachi 4
4-ominoes : 5
total patterns : 10 (= 5 * 4 / 2)
first : 10
[(1,10)]
second : 0
[]
When n
= 4, first player wins in all patterns with 1 step.
$ ./godomachi
Then input two polyominoes separated by a blank line.
- block :
#
- blank : other character
Example:
$ ./godomachi
##
###
#
###
#
----------
##.
###
.#.
###
#..
----------
#
#
.#.
.##
.#.
.##
----------
First player wins in 1 step(s)!
$ ./godomachi --first
Same as above, but check all first move patterns and list patterns by which first player wins.
Example:
$ ./godomachi --first
###
#
#
####
#
----------
Initial board
###
.#.
.#.
####
#...
----------
1 step(s)
#
#
###
.###
----------
1 step(s)
#
.##
.#.
.#.
###
#..
first wins by 2/6 pattern(s)
$ ./godomachi --rank <n>
Print all n-ominoes.
Example:
$ ./godomachi --rank 4
All free 4-ominoes : 5
0
#
#
#
#
1
##
#.
#.
2
#.
##
#.
3
##
##
4
#.
##
.#