[Haskell-cafe] Re: Pretty-printing peg solitaire boards

2007-11-26 Thread Maurí­cio
(...)However, I'm doing that because there's a single position which my brother could not solve, and he believes it to be impossible(...) I guess you meant #0# #0# ###0### ### ### ### ### This indeed can not be solved. (...) Actually, I did mean to start with:

Re: [Haskell-cafe] Re: Pretty-printing peg solitaire boards

2007-11-26 Thread Bertram Felgenhauer
Maur??cio wrote: Actually, I did mean to start with: ### ### ###0### ### ### ### ### and then go to: #0# #0# ### ### ### ### ### My brother's idea is that he can solve any board after you choose the initial peg to be removed and the first

[Haskell-cafe] Re: Pretty-printing peg solitaire boards

2007-11-26 Thread Maurí­cio
Actually, I did mean to start with: (...) #0# #0# ### ### ### ### ### (...) Heh. He's in for a surprise, there are actually solutions for this. (...) If you don't want to spoil it here, and it won't take too much of your time to write it down, you can send it

[Haskell-cafe] Re: Pretty-printing peg solitaire boards

2007-11-25 Thread John MacFarlane
You could use Text.Pandoc.Blocks (http://pandoc.googlecode.com/svn/trunk/Text/Pandoc/Blocks.hs). Something like this should do the trick: boards = map (docToBlock 7) [a, b]-- 7 is width of block colon = docToBlock 1 $ text \n\n\n: -- thin block for the colon boardSet = render $ blockToDoc

[Haskell-cafe] Re: Pretty-printing peg solitaire boards

2007-11-25 Thread Maurí­cio
Hi, I'm trying to pretty-print (with Text . PrettyPrint . HughesPJ) a set of peg solitaire boards. No matter what I try, I always get this: (...) Just curious. Are you working on the algorithm also? :) Sure. It's done already. I did generate a file with all possible (i.e., solvable)

Re: [Haskell-cafe] Re: Pretty-printing peg solitaire boards

2007-11-25 Thread Bertram Felgenhauer
Maur??cio wrote: I have to rebuild it due to a bug. However, I'm doing that because there's a single position which my brother could not solve, and he believes it to be impossible, so we want to check: #0# ###0### ### ### ### ### I guess you meant #0# #0# ###0###