Skip to content

Commit

Permalink
Release Version 0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
AussieSeaweed committed Aug 29, 2023
1 parent f893192 commit e3c546a
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ Changelog

All notable changes to this project will be documented in this file.

Version 0.1.1 (August 29, 2023)
-------------------------------

**Bugfixes**

- Fix ``AssertionError`` being raised in certain scenarios after discards are
made when the state was configured to automatically deal hole cards.

**Changed**

- When the dealer deals hole cards after standing pat or discarding, an explicit
``ValueError`` is raised unless every player has stood pat or discarded.

Version 0.1.0 (August 27, 2023)
-------------------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
project = 'PokerKit'
copyright = '2023, University of Toronto Computer Poker Research Group'
author = 'University of Toronto Computer Poker Research Group'
release = '0.1.0'
release = '0.1.1'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down
9 changes: 6 additions & 3 deletions pokerkit/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -2490,8 +2490,6 @@ def verify_card_availability_making(
return cards

def _make_card_available(self, cards: tuple[Card, ...]) -> None:
assert len(self.deck_cards) >= len(cards)

if len(cards) > len(self.deck_cards):
assert set(cards) > set(self.deck_cards)

Expand Down Expand Up @@ -2619,6 +2617,8 @@ def _verify_hole_dealing(self) -> None:
raise ValueError('card must be burnt')
elif not any(self.hole_dealing_statuses):
raise ValueError('nobody can be dealt hole cards')
elif any(self.standing_pat_or_discarding_statuses):
raise ValueError('not all have stood pat or discarded')

def verify_hole_dealing(
self,
Expand Down Expand Up @@ -2843,7 +2843,10 @@ def stand_pat_or_discard(
and not any(self.standing_pat_or_discarding_statuses)
):
self._end_dealing()
elif Automation.HOLE_DEALING in self.automations:
elif (
not any(self.standing_pat_or_discarding_statuses)
and Automation.HOLE_DEALING in self.automations
):
while any(self.hole_dealing_statuses):
self.deal_hole()

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name='pokerkit',
version='0.1.0',
version='0.1.1',
description='A Python package for various poker tools',
long_description=long_description,
long_description_content_type='text/x-rst',
Expand Down

0 comments on commit e3c546a

Please sign in to comment.