Skip to content

Instantly share code, notes, and snippets.

View beheh's full-sized avatar

Benedict Etzel beheh

  • Freelance developer
  • Germany
  • 23:54 (UTC +01:00)
View GitHub Profile
@beheh
beheh / games.php
Created December 20, 2014 22:47
CMC Gameparser
<?php
$list_count = 3;
$debug = false;
if($debug) {
header('Content-Type: text/plain; charset=utf-8');
} else {
header('Content-Type: text/css; charset=utf-8');
}
@beheh
beheh / KSPhang.txt
Created January 20, 2015 14:25
KSP Hang
Kerbal Space Program - 0.90.0.0 (LinuxPlayer) Steam BETA
OS: Linux 3.18 unknown 64bit
CPU: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz (4)
RAM: 15917
GPU: GeForce GTX 670/PCIe/SSE2 (2048MB)
SM: 30 (OpenGL 4.5 [4.5.0 NVIDIA 346.35])
RT Formats: ARGB32, Depth, ARGBHalf, RGB565, ARGB4444, ARGB1555, Default, DefaultHDR, ARGBFloat, RGFloat, RGHalf, RFloat, RHalf, R8
def test_shaman():
game = prepare_game(SHAMAN, SHAMAN)
assert game.player1.hero.id is SHAMAN
assert len(game.player1.hero.power.data.entourage) == 4
# use hero power four times
for i in range(4):
assert len(game.player1.field) == i
assert game.player1.hero.power.is_usable()
game.player1.hero.power.use()
@beheh
beheh / siege.py
Last active August 29, 2015 14:26
def test_siege_engine():
game = prepare_game(WARRIOR, WARRIOR)
game.player1.hero.power.use()
assert game.player1.hero.armor == 2
siege = game.player1.give("GVG_086")
siege.play()
assert siege.atk == 5
assert siege.health == 5
game.end_turn()
[fireplace.utils]: Initializing a new game
[fireplace.entity]: Starting game BaseTestGame(players=(Player(name='Player1', hero=None), Player(name='Player2', hero=None)))
[fireplace.actions]: Player(name='Player1', hero=<Hero ('Rexxar')>) triggering <TargetedAction: Summon(CARDS=<HeroPower ('Steady Shot')>)> targeting [Player(name='Player1', hero=<Hero ('Rexxar')>)]
[fireplace.actions]: Player1 summons [<HeroPower ('Steady Shot')>]
[fireplace.actions]: Player(name='Player1', hero=<Hero ('Rexxar')>) triggering <TargetedAction: Summon(CARDS=<Hero ('Rexxar')>)> targeting [Player(name='Player1', hero=<Hero ('Rexxar')>)]
[fireplace.actions]: Player1 summons [<Hero ('Rexxar')>]
[fireplace.entity]: Player(name='Player1', hero=<Hero ('Rexxar')>) shuffles their deck
[fireplace.actions]: Player(name='Player2', hero=<Hero ('Malfurion Stormrage')>) triggering <TargetedAction: Summon(CARDS=<HeroPower ('Shapeshift')>)> targeting [Player(name='Player2', hero=<Hero ('Malfurion Stormrage')>)]
[fireplace.actions]: Player2 summo
@beheh
beheh / AssertionError.log
Created December 15, 2015 09:51
AssertionError with Mogor
Starting game Game(players=(Player(name='Player1', hero=None), Player(name='Player2', hero=None)))
Player(name='Player1', hero=<Hero ("Gul'dan")>) triggering <TargetedAction: Summon(CARDS=<HeroPower ('Life Tap')>)> targeting [Player(name='Player1', hero=<Hero ("Gul'dan")>)]
Player1 summons [<HeroPower ('Life Tap')>]
Player(name='Player1', hero=<Hero ("Gul'dan")>) triggering <TargetedAction: Summon(CARDS=<Hero ("Gul'dan")>)> targeting [Player(name='Player1', hero=<Hero ("Gul'dan")>)]
Player1 summons [<Hero ("Gul'dan")>]
Player(name='Player1', hero=<Hero ("Gul'dan")>) shuffles their deck
Player(name='Player2', hero=<Hero ('Malfurion Stormrage')>) triggering <TargetedAction: Summon(CARDS=<HeroPower ('Shapeshift')>)> targeting [Player(name='Player2', hero=<Hero ('Malfurion Stormrage')>)]
Player2 summons [<HeroPower ('Shapeshift')>]
Player(name='Player2', hero=<Hero ('Malfurion Stormrage')>) triggering <TargetedAction: Summon(CARDS=<Hero ('Malfurion Stormrage')>)> targeting [Player(name='Player2', hero=<Hero ('Mal
Traceback (most recent call last):
File "./test_fuzzy.py", line 70, in main
File "/home/benedict/Dokumente/fireplace/fireplace/card.py", line 299, in play
self.game.queue_actions(self.controller, [actions.Play(self, target, index)])
File "/home/benedict/Dokumente/fireplace/fireplace/game.py", line 160, in queue_actions
ret = self.trigger_actions(source, actions)
File "/home/benedict/Dokumente/fireplace/fireplace/game.py", line 184, in trigger_actions
ret.append(action.trigger(source))
File "/home/benedict/Dokumente/fireplace/fireplace/actions.py", line 127, in trigger
self.do(source, *args)
This file has been truncated, but you can view the full file.
D 10:21:55.4241030 GameState.DebugPrintPowerList() - Count=76
D 10:21:55.4276270 GameState.DebugPrintPower() - CREATE_GAME
D 10:21:55.4284940 GameState.DebugPrintPower() - GameEntity EntityID=1
D 10:21:55.4315140 GameState.DebugPrintPower() - tag=10 value=85
D 10:21:55.4325480 GameState.DebugPrintPower() - tag=TURN value=1
D 10:21:55.4336610 GameState.DebugPrintPower() - tag=ZONE value=PLAY
D 10:21:55.4347710 GameState.DebugPrintPower() - tag=ENTITY_ID value=1
D 10:21:55.4363310 GameState.DebugPrintPower() - tag=NEXT_STEP value=BEGIN_MULLIGAN
D 10:21:55.4373760 GameState.DebugPrintPower() - tag=CARDTYPE value=GAME
D 10:21:55.4384890 GameState.DebugPrintPower() - tag=STATE value=RUNNING
{
"shortid": "5XdH42ucdtJaJbxNmQDUoQ",
"user": {
"id": 5,
"battletag": null,
"username": null
},
"global_game": {
"build": 15590,
"match_start": "2017-01-25T22:52:31.897906Z",

Keybase proof

I hereby claim:

  • I am beheh on github.
  • I am beheh (https://keybase.io/beheh) on keybase.
  • I have a public key ASCdohWoQbu78wriFl7cMKEgf_nHgOYnmR3BR0euQlRVKAo

To claim this, I am signing this object: