Bugs
Moderators: silly freak, CCGHQ Admins
Bugs
by nantuko84 » 11 Sep 2010, 10:08
Here I will post bugs if find any.
Here is the first one (though it can be reproduced only in debug):
1. Replace
2. Put break point on PhaseStructureImpl.#beforeReceivePriority:
LoseOnLifeAction always returns true, so repeat variable is always true as well
but if I just run TestCardPanel, it's ok: game is over saying that both players have lost.
Here is the first one (though it can be reproduced only in debug):
1. Replace
- Code: Select all
p.getLifeTotal().setLifeTotal(20);
- Code: Select all
p.getLifeTotal().setLifeTotal(0);
2. Put break point on PhaseStructureImpl.#beforeReceivePriority:
- Code: Select all
repeat = false;
LoseOnLifeAction always returns true, so repeat variable is always true as well
but if I just run TestCardPanel, it's ok: game is over saying that both players have lost.
Mage\MagicWars blog: http://mwars.blogspot.com/
Re: Bugs
by silly freak » 11 Sep 2010, 11:33
Your interpretation of what's going is not correct. Both players loose the game in the game initializer:
then, when GameLoop.run is called, it doesn't check for winning and losing until the prior player has performed an action. I resolved it by moving the check to the beginning of the loop.
btw, in what usecase does this behavior matter?
- Code: Select all
//start the first turn
game.getPhaseStructure().takeAction(false);
then, when GameLoop.run is called, it doesn't check for winning and losing until the prior player has performed an action. I resolved it by moving the check to the beginning of the loop.
btw, in what usecase does this behavior matter?
___
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
- silly freak
- DEVELOPER
- Posts: 598
- Joined: 26 Mar 2009, 07:18
- Location: Vienna, Austria
- Has thanked: 93 times
- Been thanked: 25 times
Re: Bugs
by nantuko84 » 11 Sep 2010, 12:28
do you mean that LoseOnLifeAction will never return "true" inside beforeReceivePriority?
Mage\MagicWars blog: http://mwars.blogspot.com/
Re: Bugs
by silly freak » 11 Sep 2010, 12:56
it will, but only once. The action iterates over getPlayersInGame(). After loseGame() was called on the player, it won't be in that list, so during the next loop it will return false (normally)
___
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
- silly freak
- DEVELOPER
- Posts: 598
- Joined: 26 Mar 2009, 07:18
- Location: Vienna, Austria
- Has thanked: 93 times
- Been thanked: 25 times
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest