How to use the hearthstone.enums.BnetGameType function in hearthstone

To help you get started, we’ve selected a few hearthstone examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github HearthSim / python-hearthstone / hearthstone / enums.py View on Github external
return BnetGameType.BGT_CASUAL_WILD if wild else BnetGameType.BGT_CASUAL_STANDARD

		return {
			GameType.GT_UNKNOWN: BnetGameType.BGT_UNKNOWN,
			GameType.GT_VS_AI: BnetGameType.BGT_VS_AI,
			GameType.GT_VS_FRIEND: BnetGameType.BGT_FRIENDS,
			GameType.GT_TUTORIAL: BnetGameType.BGT_TUTORIAL,
			GameType.GT_ARENA: BnetGameType.BGT_ARENA,
			GameType.GT_TEST_AI_VS_AI: BnetGameType.BGT_TEST1,
			GameType.GT_TAVERNBRAWL: BnetGameType.BGT_TAVERNBRAWL_PVP,
			GameType.GT_TB_1P_VS_AI: BnetGameType.BGT_TAVERNBRAWL_1P_VERSUS_AI,
			GameType.GT_TB_2P_COOP: BnetGameType.BGT_TAVERNBRAWL_2P_COOP,
			GameType.GT_FSG_BRAWL_VS_FRIEND: BnetGameType.BGT_FSG_BRAWL_VS_FRIEND,
			GameType.GT_FSG_BRAWL: BnetGameType.BGT_FSG_BRAWL_PVP,
			GameType.GT_FSG_BRAWL_1P_VS_AI: BnetGameType.BGT_FSG_BRAWL_1P_VERSUS_AI,
			GameType.GT_FSG_BRAWL_2P_COOP: BnetGameType.BGT_FSG_BRAWL_2P_COOP,
			GameType.GT_BATTLEGROUNDS: BnetGameType.BGT_BATTLEGROUNDS,
			# GameType.GT_LAST: BnetGameType.BGT_LAST,
		}[self]
github HearthSim / python-hearthstone / hearthstone / enums.py View on Github external
def as_bnet(self, wild=False):
		if self == GameType.GT_RANKED:
			return BnetGameType.BGT_RANKED_WILD if wild else BnetGameType.BGT_RANKED_STANDARD
		if self == GameType.GT_CASUAL:
			return BnetGameType.BGT_CASUAL_WILD if wild else BnetGameType.BGT_CASUAL_STANDARD

		return {
			GameType.GT_UNKNOWN: BnetGameType.BGT_UNKNOWN,
			GameType.GT_VS_AI: BnetGameType.BGT_VS_AI,
			GameType.GT_VS_FRIEND: BnetGameType.BGT_FRIENDS,
			GameType.GT_TUTORIAL: BnetGameType.BGT_TUTORIAL,
			GameType.GT_ARENA: BnetGameType.BGT_ARENA,
			GameType.GT_TEST_AI_VS_AI: BnetGameType.BGT_TEST1,
			GameType.GT_TAVERNBRAWL: BnetGameType.BGT_TAVERNBRAWL_PVP,
			GameType.GT_TB_1P_VS_AI: BnetGameType.BGT_TAVERNBRAWL_1P_VERSUS_AI,
			GameType.GT_TB_2P_COOP: BnetGameType.BGT_TAVERNBRAWL_2P_COOP,
			GameType.GT_FSG_BRAWL_VS_FRIEND: BnetGameType.BGT_FSG_BRAWL_VS_FRIEND,
			GameType.GT_FSG_BRAWL: BnetGameType.BGT_FSG_BRAWL_PVP,
			GameType.GT_FSG_BRAWL_1P_VS_AI: BnetGameType.BGT_FSG_BRAWL_1P_VERSUS_AI,
			GameType.GT_FSG_BRAWL_2P_COOP: BnetGameType.BGT_FSG_BRAWL_2P_COOP,
			GameType.GT_BATTLEGROUNDS: BnetGameType.BGT_BATTLEGROUNDS,
			# GameType.GT_LAST: BnetGameType.BGT_LAST,
		}[self]
github HearthSim / python-hearthstone / hearthstone / enums.py View on Github external
def as_bnet(self, wild=False):
		if self == GameType.GT_RANKED:
			return BnetGameType.BGT_RANKED_WILD if wild else BnetGameType.BGT_RANKED_STANDARD
		if self == GameType.GT_CASUAL:
			return BnetGameType.BGT_CASUAL_WILD if wild else BnetGameType.BGT_CASUAL_STANDARD

		return {
			GameType.GT_UNKNOWN: BnetGameType.BGT_UNKNOWN,
			GameType.GT_VS_AI: BnetGameType.BGT_VS_AI,
			GameType.GT_VS_FRIEND: BnetGameType.BGT_FRIENDS,
			GameType.GT_TUTORIAL: BnetGameType.BGT_TUTORIAL,
			GameType.GT_ARENA: BnetGameType.BGT_ARENA,
			GameType.GT_TEST_AI_VS_AI: BnetGameType.BGT_TEST1,
			GameType.GT_TAVERNBRAWL: BnetGameType.BGT_TAVERNBRAWL_PVP,
			GameType.GT_TB_1P_VS_AI: BnetGameType.BGT_TAVERNBRAWL_1P_VERSUS_AI,
			GameType.GT_TB_2P_COOP: BnetGameType.BGT_TAVERNBRAWL_2P_COOP,
			GameType.GT_FSG_BRAWL_VS_FRIEND: BnetGameType.BGT_FSG_BRAWL_VS_FRIEND,
			GameType.GT_FSG_BRAWL: BnetGameType.BGT_FSG_BRAWL_PVP,
			GameType.GT_FSG_BRAWL_1P_VS_AI: BnetGameType.BGT_FSG_BRAWL_1P_VERSUS_AI,
			GameType.GT_FSG_BRAWL_2P_COOP: BnetGameType.BGT_FSG_BRAWL_2P_COOP,
			GameType.GT_BATTLEGROUNDS: BnetGameType.BGT_BATTLEGROUNDS,
			# GameType.GT_LAST: BnetGameType.BGT_LAST,
		}[self]
github HearthSim / python-hearthstone / hearthstone / enums.py View on Github external
return {
			GameType.GT_UNKNOWN: BnetGameType.BGT_UNKNOWN,
			GameType.GT_VS_AI: BnetGameType.BGT_VS_AI,
			GameType.GT_VS_FRIEND: BnetGameType.BGT_FRIENDS,
			GameType.GT_TUTORIAL: BnetGameType.BGT_TUTORIAL,
			GameType.GT_ARENA: BnetGameType.BGT_ARENA,
			GameType.GT_TEST_AI_VS_AI: BnetGameType.BGT_TEST1,
			GameType.GT_TAVERNBRAWL: BnetGameType.BGT_TAVERNBRAWL_PVP,
			GameType.GT_TB_1P_VS_AI: BnetGameType.BGT_TAVERNBRAWL_1P_VERSUS_AI,
			GameType.GT_TB_2P_COOP: BnetGameType.BGT_TAVERNBRAWL_2P_COOP,
			GameType.GT_FSG_BRAWL_VS_FRIEND: BnetGameType.BGT_FSG_BRAWL_VS_FRIEND,
			GameType.GT_FSG_BRAWL: BnetGameType.BGT_FSG_BRAWL_PVP,
			GameType.GT_FSG_BRAWL_1P_VS_AI: BnetGameType.BGT_FSG_BRAWL_1P_VERSUS_AI,
			GameType.GT_FSG_BRAWL_2P_COOP: BnetGameType.BGT_FSG_BRAWL_2P_COOP,
			GameType.GT_BATTLEGROUNDS: BnetGameType.BGT_BATTLEGROUNDS,
			# GameType.GT_LAST: BnetGameType.BGT_LAST,
		}[self]
github HearthSim / python-hearthstone / hearthstone / enums.py View on Github external
BGT_FSG_BRAWL_PVP = 41
	BGT_FSG_BRAWL_1P_VERSUS_AI = 42
	BGT_FSG_BRAWL_2P_COOP = 43
	BGT_RANKED_STANDARD_NEW_PLAYER = 45
	BGT_BATTLEGROUNDS = 50
	# BGT_LAST = 46

	BGT_NEWBIE = BGT_CASUAL_STANDARD_NEWBIE
	BGT_CASUAL_STANDARD = BGT_CASUAL_STANDARD_NORMAL

	# Removed
	# BGT_TOURNAMENT = 44


STANDARD_GAME_TYPES = [
	BnetGameType.BGT_CASUAL_STANDARD,
	BnetGameType.BGT_RANKED_STANDARD,
]

WILD_GAME_TYPES = [
	BnetGameType.BGT_CASUAL_WILD,
	BnetGameType.BGT_RANKED_WILD,
]


class GameType(IntEnum):
	"""PegasusShared.GameType"""
	GT_UNKNOWN = 0
	GT_VS_AI = 1
	GT_VS_FRIEND = 2
	GT_TUTORIAL = 4
	GT_ARENA = 5
github HearthSim / python-hearthstone / hearthstone / enums.py View on Github external
def as_bnet(self, wild=False):
		if self == GameType.GT_RANKED:
			return BnetGameType.BGT_RANKED_WILD if wild else BnetGameType.BGT_RANKED_STANDARD
		if self == GameType.GT_CASUAL:
			return BnetGameType.BGT_CASUAL_WILD if wild else BnetGameType.BGT_CASUAL_STANDARD

		return {
			GameType.GT_UNKNOWN: BnetGameType.BGT_UNKNOWN,
			GameType.GT_VS_AI: BnetGameType.BGT_VS_AI,
			GameType.GT_VS_FRIEND: BnetGameType.BGT_FRIENDS,
			GameType.GT_TUTORIAL: BnetGameType.BGT_TUTORIAL,
			GameType.GT_ARENA: BnetGameType.BGT_ARENA,
			GameType.GT_TEST_AI_VS_AI: BnetGameType.BGT_TEST1,
			GameType.GT_TAVERNBRAWL: BnetGameType.BGT_TAVERNBRAWL_PVP,
			GameType.GT_TB_1P_VS_AI: BnetGameType.BGT_TAVERNBRAWL_1P_VERSUS_AI,
			GameType.GT_TB_2P_COOP: BnetGameType.BGT_TAVERNBRAWL_2P_COOP,
			GameType.GT_FSG_BRAWL_VS_FRIEND: BnetGameType.BGT_FSG_BRAWL_VS_FRIEND,
			GameType.GT_FSG_BRAWL: BnetGameType.BGT_FSG_BRAWL_PVP,
			GameType.GT_FSG_BRAWL_1P_VS_AI: BnetGameType.BGT_FSG_BRAWL_1P_VERSUS_AI,
			GameType.GT_FSG_BRAWL_2P_COOP: BnetGameType.BGT_FSG_BRAWL_2P_COOP,
			GameType.GT_BATTLEGROUNDS: BnetGameType.BGT_BATTLEGROUNDS,
			# GameType.GT_LAST: BnetGameType.BGT_LAST,
		}[self]