Hi Reinhard,
Yeah I noticed you passed an integer but I have no real usage for that.
The idea as I see it, is to pick a random position when you want a new
game, so you'd have to pick the integer randomly anyway.
Should one still for some reason want to save or forward the opening
position to others, it would probably be easier to just use the generated
fen directly.
For example the PGN format has such a header tag for FENs.
But truth be told, I see this as just a special case of a more general
game design. I'm making an engine that can play "chess" on
a 64x64 board!
I haven't yet decided how to define castle rules in the general case though,
I'm not sure I even want to tackle that. You can imagine that an opening
position should always be shuffled here though.
What do you think?
- Code: Select all
63 n q c e q r e e m r m n m n b c r e m n m b q r c b q c q m c n q q e b q m m e b r c e b n c q c k e b e c q n e c n q b q r q
62 b b q n e c m q b c m e m e r c m n r c r r r n e m m e q b e e r n e m b q n m n r b q q c n e n n e b c b e b b m m n n q r b
61 q n q n c m e m r n q e n b e c c m q c m q r q r c e e c m r n r q b c m m q q n e c m r b e q q c q r b r r b m n n n b r r c
60 r r e r n m m c e m n e q e n b e b c q r e r b m m n e e e e b b r e c r q r m c r m b c m m c n c n n q b n e q r n q c n r c
59 b c r m c c n e c n n c c c e n n m b q r e n b c b q b e q n m q r q c e q b q n q n q e q c c m n b n m c q n m m m n r b m c
58 q b e e c c m c e b n c n b r n b r m q r e e n q m n e e c q e n m r q m b c m c b r r q r n c m b e b r e e b c e e e n q n c
57 e m e n r e c r n e c n q c n n r r r e e b q n m e b q q r r c q b m m n c c c r m q b r n c n e n e b c e c r q b e c e r r e
56 e m m n q n e r e n b m n b b b e e b c c c m e q q m m e r q m b c b e c c b n m e b e c e e q r r c m b e e m e e b e c n c e
55 e q r m n b c c c e e e m e n c q b e b n q c b b b n b r q b n b m c e q n b n c b q b c n r m n e n c e c n e e c r n e m r b
54 e q r r b c m r r m q n c q b c q q m r e q q c n m b n n c m n m c q b q e b c q q q e b n b e n r m m r m c r q r b b b n r m
53 c b b b n c c q e e q q b c m q c n b r b m n r c c e q b n m e b m b e c b n c c e b c c m m q e q q m m c e n c e q b c q r c
52 r b b r r b m b c m m n e r m q c e n c b r c e q r r e r c r e b c q m b q n r e n r q n m c b r b r b c m r m n r c r b e m q
51 e c e m c c r b e n c n r c e b q e e n q b e b n q c n c m r b r c n e n e e e c e q r b c e e m n b n r b e r e m q c b r c n
50 n r n q m q c c r e r e m c c q m c m b c m e m m m m n q m m m e b n b b n n q b m q n b r r r m e m c n n r m n c b m e b c e
49 b e c q q c m c c q e n m m e e e r n e e q b q n e b n m n n n e r c q b m b m n q r q m e m e n b r q c r m b b r c q m r q r
48 e b e c c b r n q r m m q c q r b q e m m c r m m r n n r m b c m r r m c c q e n r m m m e r m n b c b n b r b e r e e q e r r
47 b r b e b m r e c b e e n b n e b r m m r r q n r n m q m q b m q m q n m m n n b b b m c n e m q n b m c b m c n b c c e c c m
46 r c m n e c m n b n r m n n c c n e n n r r n r n c m r r n m b q n b m m q m r q r r c q n c m m b n b n c q b q c m e n n n n
45 q e e r m b c c r c b r q m r b q b n n m e n q q b e m n e c c b r b q n m e q c r m q r e n b m b r c m n r b e e b c b m c m
44 b n b b m q q m b q m c q c c n r b m m r e e r e q b c e c r r c e e b q m r c m n r m q b b m q q e n n n m m e r b c r m r q
43 q r r b n r e m n m q b r n b b b r e b c c b e b e n q m m c n n n r n b r q m r c q b m m n q q e q q q c b r e m m q m m q n
42 e q r m c q r q r n q r n n c m r m c c b n b r c m e c n m n b n n c r q r c q n n r q m q e m r r n n q n c b r n n c q e m e
41 b e n b e q b r b n c r m c e b e m r r q n q n q m e e c e c e q r b e q c c e n c n r q r n n c n q r m r r c r n r n e b m r
40 e m m e b r r q m r b n b e n n c e q q e r m e r e e m c n b c c b r c n r c b r c r e q b c q n m c m e e b q n e n q r m m c
39 m r e b n m e r b e b n c m n n q e b r m n e q n e e m c c n n q q c e q m q n e r q b r m r r n e r m c e c q c c e q c c n b
38 c m n b m n e c b n n r b b m m c n b n m r e b e b q q q q r b c c m m q n q m m b q n m m b r e b e q b m n q b m e r n b n m
37 m q q m q e c b r e m m e q e q r r q m b b c c c b e c r c c c c m m q r b q m n n q q m n c b q q m m r n c b m n m b q b r n
36 q m q n r n q e m c q e m m n c q r r e e q c q c n q n c n m c r m e b m c b r c c q m m e q r c e r b q r m e r e r m n r c r
35 p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p p
34
33
32
31
30
29
28 P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P
27 Q M Q N R N Q E M C Q E M M N C Q R R E E Q C Q C N Q N C N M C R M E B M C B R C C Q M M E Q R C E R B Q R M E R E R M N R C R
26 M Q Q M Q E C B R E M M E Q E Q R R Q M B B C C C B E C R C C C C M M Q R B Q M N N Q Q M N C B Q Q M M R N C B M N M B Q B R N
25 C M N B M N E C B N N R B B M M C N B N M R E B E B Q Q Q Q R B C C M M Q N Q M M B Q N M M B R E B E Q B M N Q B M E R N B N M
24 M R E B N M E R B E B N C M N N Q E B R M N E Q N E E M C C N N Q Q C E Q M Q N E R Q B R M R R N E R M C E C Q C C E Q C C N B
23 E M M E B R R Q M R B N B E N N C E Q Q E R M E R E E M C N B C C B R C N R C B R C R E Q B C Q N M C M E E B Q N E N Q R M M C
22 B E N B E Q B R B N C R M C E B E M R R Q N Q N Q M E E C E C E Q R B E Q C C E N C N R Q R N N C N Q R M R R C R N R N E B M R
21 E Q R M C Q R Q R N Q R N N C M R M C C B N B R C M E C N M N B N N C R Q R C Q N N R Q M Q E M R R N N Q N C B R N N C Q E M E
20 Q R R B N R E M N M Q B R N B B B R E B C C B E B E N Q M M C N N N R N B R Q M R C Q B M M N Q Q E Q Q Q C B R E M M Q M M Q N
19 B N B B M Q Q M B Q M C Q C C N R B M M R E E R E Q B C E C R R C E E B Q M R C M N R M Q B B M Q Q E N N N M M E R B C R M R Q
18 Q E E R M B C C R C B R Q M R B Q B N N M E N Q Q B E M N E C C B R B Q N M E Q C R M Q R E N B M B R C M N R B E E B C B M C M
17 R C M N E C M N B N R M N N C C N E N N R R N R N C M R R N M B Q N B M M Q M R Q R R C Q N C M M B N B N C Q B Q C M E N N N N
16 B R B E B M R E C B E E N B N E B R M M R R Q N R N M Q M Q B M Q M Q N M M N N B B B M C N E M Q N B M C B M C N B C C E C C M
15 E B E C C B R N Q R M M Q C Q R B Q E M M C R M M R N N R M B C M R R M C C Q E N R M M M E R M N B C B N B R B E R E E Q E R R
14 B E C Q Q C M C C Q E N M M E E E R N E E Q B Q N E B N M N N N E R C Q B M B M N Q R Q M E M E N B R Q C R M B B R C Q M R Q R
13 N R N Q M Q C C R E R E M C C Q M C M B C M E M M M M N Q M M M E B N B B N N Q B M Q N B R R R M E M C N N R M N C B M E B C E
12 E C E M C C R B E N C N R C E B Q E E N Q B E B N Q C N C M R B R C N E N E E E C E Q R B C E E M N B N R B E R E M Q C B R C N
11 R B B R R B M B C M M N E R M Q C E N C B R C E Q R R E R C R E B C Q M B Q N R E N R Q N M C B R B R B C M R M N R C R B E M Q
10 C B B B N C C Q E E Q Q B C M Q C N B R B M N R C C E Q B N M E B M B E C B N C C E B C C M M Q E Q Q M M C E N C E Q B C Q R C
9 E Q R R B C M R R M Q N C Q B C Q Q M R E Q Q C N M B N N C M N M C Q B Q E B C Q Q Q E B N B E N R M M R M C R Q R B B B N R M
8 E Q R M N B C C C E E E M E N C Q B E B N Q C B B B N B R Q B N B M C E Q N B N C B Q B C N R M N E N C E C N E E C R N E M R B
7 E M M N Q N E R E N B M N B B B E E B C C C M E Q Q M M E R Q M B C B E C C B N M E B E C E E Q R R C M B E E M E E B E C N C E
6 E M E N R E C R N E C N Q C N N R R R E E B Q N M E B Q Q R R C Q B M M N C C C R M Q B R N C N E N E B C E C R Q B E C E R R E
5 Q B E E C C M C E B N C N B R N B R M Q R E E N Q M N E E C Q E N M R Q M B C M C B R R Q R N C M B E B R E E B C E E E N Q N C
4 B C R M C C N E C N N C C C E N N M B Q R E N B C B Q B E Q N M Q R Q C E Q B Q N Q N Q E Q C C M N B N M C Q N M M M N R B M C
3 R R E R N M M C E M N E Q E N B E B C Q R E R B M M N E E E E B B R E C R Q R M C R M B C M M C N C N N Q B N E Q R N Q C N R C
2 Q N Q N C M E M R N Q E N B E C C M Q C M Q R Q R C E E C M R N R Q B C M M Q Q N E C M R B E Q Q C Q R B R R B M N N N B R R C
1 B B Q N E C M Q B C M E M E R C M N R C R R R N E M M E Q B E E R N E M B Q N M N R B Q Q C N E N N E B C B E B B M M N N Q R B
0 N Q C E Q R E E M R M N M N B C R E M N M B Q R C B Q C Q M C N Q Q E B Q M M E B R C E B N C Q C K E B E C Q N E C N Q B Q R Q
0 1 2 3 4 5 6 7 8 9101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263