Anonymous user
Generate random chess position: Difference between revisions
m
→{{header|Haskell}}
Line 727:
placeRemaining b = do
n <- num (sum $ map snd remaining)
putStrLn $ "
" more random positions after placing 2 kings and "
<> (show $ totalPawns b) <> " pawns. "
Line 790:
Run 1
<pre>
a b c d e f g h
---------------------------------
8 | | | |
---------------------------------
7 |
---------------------------------
6 |
---------------------------------
5 | | | ♟ | |
---------------------------------
4 | | | | |
---------------------------------
3 |
---------------------------------
2 |
---------------------------------
1 | | | |
---------------------------------
a b c d e f g h
</pre>
Run 2
<pre>
a b c d e f g h
---------------------------------
8 | |
---------------------------------
7 |
---------------------------------
6 | | | | |
---------------------------------
5 | |
---------------------------------
4 | |
---------------------------------
3 |
---------------------------------
2 | | |
---------------------------------
1 | |
---------------------------------
a b c d e f g h
</pre>
etc...
|