How to use the hearthstone.enums.GameType 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-hslog / tests / test_logs.py View on Github external
def test_debugprintgame(parser):
	with open(logfile("23576_debugprintgame.power.log")) as f:
		parser.read(f)

	assert parser.game_meta == {
		"BuildNumber": 23576,
		"FormatType": FormatType.FT_WILD,
		"GameType": GameType.GT_RANKED,
		"ScenarioID": 2,
	}
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 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
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
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
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,
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,
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]