grifferz / pah-irc

Perpetually Against Humanity, IRC Edition
Artistic License 2.0
11 stars 10 forks source link

When resigning and rejoining, one's hand changes order #152

Open zuzak opened 9 years ago

zuzak commented 9 years ago

If you resign a game using pah: resign, then deal back in relatively soon, you get mostly the same cards but the order of the hand changes. It would be nice if the cards you had before remained in the same position.

Example

Before resignation
< pah> Your white cards in #channel:
< pah> 1. foo
< pah> 2. bar
< pah> 3. baz
< pah> 4. xyzzy
...
Current behaviour
< pah> 10 new cards have been dealt to you in #channel:
< pah> 1. baz
< pah> 2. plugh
< pah> 3. bar
< pah> 4. foo
...
Expected behaviour
< pah> 10 new cards have been dealt to you in #channel:
< pah> 1. foo
< pah> 2. bar
< pah> 3. baz
< pah> 4. plugh
...
grifferz commented 9 years ago

Tricky one, as cards coming off the deck or off the discard pile have no position associated with them and just go into whatever hand positions are available.

I might experiment with putting cards into the discard pile in hand position order and then take them back out again in that same order, so they hopefully end up in the same places.