mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 04:42:07 -08:00
* Added optional rollback current turn and up to 3 previous turns to the battlefield menu. All other players have to agree to the rollback to let it happen.
This commit is contained in:
parent
5736efa103
commit
8acf28eed1
38 changed files with 661 additions and 252 deletions
|
|
@ -27,7 +27,7 @@ import java.util.Random;
|
|||
*/
|
||||
public class PlayGameTest extends MageTestBase {
|
||||
|
||||
private static List<String> colorChoices = Arrays.asList("bu", "bg", "br", "bw", "ug", "ur", "uw", "gr", "gw", "rw", "bur", "buw", "bug", "brg", "brw", "bgw", "wur", "wug", "wrg", "rgu");
|
||||
private final static List<String> colorChoices = Arrays.asList("bu", "bg", "br", "bw", "ug", "ur", "uw", "gr", "gw", "rw", "bur", "buw", "bug", "brg", "brw", "bgw", "wur", "wug", "wrg", "rgu");
|
||||
|
||||
@Ignore
|
||||
@Test
|
||||
|
|
@ -67,7 +67,8 @@ public class PlayGameTest extends MageTestBase {
|
|||
long t1 = System.nanoTime();
|
||||
GameOptions options = new GameOptions();
|
||||
options.testMode = true;
|
||||
game.start(computerA.getId(), options);
|
||||
game.setGameOptions(options);
|
||||
game.start(computerA.getId());
|
||||
long t2 = System.nanoTime();
|
||||
|
||||
logger.info("Winner: " + game.getWinner());
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import java.util.Random;
|
|||
*/
|
||||
public class TestPlayRandomGame extends MageTestBase {
|
||||
|
||||
private static List<String> colorChoices = Arrays.asList("bu", "bg", "br", "bw", "ug", "ur", "uw", "gr", "gw", "rw", "bur", "buw", "bug", "brg", "brw", "bgw", "wur", "wug", "wrg", "rgu");
|
||||
private final static List<String> colorChoices = Arrays.asList("bu", "bg", "br", "bw", "ug", "ur", "uw", "gr", "gw", "rw", "bur", "buw", "bug", "brg", "brw", "bgw", "wur", "wug", "wrg", "rgu");
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
|
|
@ -58,12 +58,11 @@ public class TestPlayRandomGame extends MageTestBase {
|
|||
game.addPlayer(computerB, deck2);
|
||||
game.loadCards(deck2.getCards(), computerB.getId());
|
||||
|
||||
boolean testMode = true;
|
||||
|
||||
long t1 = System.nanoTime();
|
||||
GameOptions options = new GameOptions();
|
||||
options.testMode = true;
|
||||
game.start(computerA.getId(), options);
|
||||
game.setGameOptions(options);
|
||||
game.start(computerA.getId());
|
||||
long t2 = System.nanoTime();
|
||||
|
||||
logger.info("Winner: " + game.getWinner());
|
||||
|
|
|
|||
|
|
@ -172,7 +172,8 @@ public abstract class CardTestPlayerAPIImpl extends MageTestPlayerBase implement
|
|||
gameOptions.testMode = true;
|
||||
gameOptions.stopOnTurn = stopOnTurn;
|
||||
gameOptions.stopAtStep = stopAtStep;
|
||||
currentGame.start(activePlayer.getId(), gameOptions);
|
||||
currentGame.setGameOptions(gameOptions);
|
||||
currentGame.start(activePlayer.getId());
|
||||
long t2 = System.nanoTime();
|
||||
logger.debug("Winner: " + currentGame.getWinner());
|
||||
logger.info("Test has been executed. Execution time: " + (t2 - t1) / 1000000 + " ms");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue