Commit Graph

23 Commits (2733516cb9cdad7ac4cef98b819d4d01846e5c66)

Author SHA1 Message Date
Leandro Doctors 2733516cb9 Organize imports 2020-01-16 08:21:24 +08:00
Martin Petricek bd5ae5fd7a Refactoring (#1543)
* Fix typos.

* Remove unnecessary boxing/unboxing.

* Replace traditional 'for' loops with 'foreach' loops.

* Replace explicit types with <> (diamonds) where they can be inferred.

* Collapse identical catch branches.

* Replace statement lambda with expression lambda for short statements.

* Remove unnecessary imports.

* Replace some lambdas with Comparator.comparing

* Replace Runnables with lambdas.

* Use addAll instead of adding whole collection manually.

* Simplify boolean expressions.

* Remove redundant 'else'.

* Simplify some boolean conditions that are always true or false.

* Inline redundant local variables.

* Remove extraneous semicolons.

* Fix Javadoc errors.

* Replace anonymous classes with lambdas.

* Replace chain of 'if's with switch.

* Remove delaration of exception that is never thrown.

* Use String/StringBuilder properly.
2018-04-08 08:59:14 +08:00
melvinzhang 7263240ffd remove autoboxing as it is more performant 2017-06-17 11:40:17 +08:00
melvinzhang bbbdcac9ef add override annotation to overridden methods 2017-06-17 11:19:03 +08:00
melvinzhang f9718bc77b acceptPossibleLandCard and acceptPossibleSpellCard are overwritten in subclass
This reverts commit 803cbb5b21.
2017-02-08 09:24:26 +08:00
lodici 1f8dd4db1a Set default cube in RandomDeckGenerator; remove call to setCubeDefinition() in the contructor of the theme generator classes since always returns DEFAULT_CUBE; simplify code. 2015-05-26 17:45:25 +01:00
melvinzhang e2837e5be0 make non-deterministic rng private 2015-04-12 11:59:56 +08:00
melvinzhang 80b7df402e replace java.util.Random with MagicRandom 2015-03-08 20:45:58 +08:00
Lodici aaea93bfdb fix for issue 672. This addresses the case where the random deck generator was creating decks with hidden cards. 2014-09-09 18:05:32 +01:00
Lodici 16703af3bb rename getCards() to getPlayableCards() for clarity. 2014-08-24 09:42:49 +01:00
melvin 2f687bd921 ensure space after if and for 2014-04-11 11:43:22 +08:00
Lodici 1326f340c1 refactor: rename DefaultDeckGenerator to RandomDeckGenerator. DefaultDeckGenerator conveys no information about what the class does. 2014-03-13 15:20:49 +00:00
Lodici 4ae4c9e043 refactor: renamed MagicPlayerProfile to MagicDeckProfile (see issue 506 for more details). 2014-03-13 10:24:17 +00:00
melvin 64368e1b9a remove extraneous whitespace 2013-06-24 09:33:35 +08:00
melvin f1b27c586c convert to UNIX line endings 2013-04-13 10:32:25 +08:00
melvin 631dd73e4b infer final annotation for local variables 2012-09-28 16:04:12 +08:00
melvin dcc8d38484 optimized imports 2012-09-27 14:11:44 +08:00
melvin 83c9fc56bc convert tab to four spaces 2012-08-26 16:55:32 +08:00
melvin 0a2d6bb22c convert CubeDefinitions to a static class 2011-11-23 13:59:43 +08:00
melvin 161e3d5675 convert CardDefinitions and TokenCardDefinitions to a static class 2011-11-23 13:49:13 +08:00
wait321 86d6b5c39e added white metal deck generator. removed imports and minor changes to other generators 2011-10-22 08:35:04 -07:00
wait321 f410d2f04e made mono tribal generator more use mana cost restrictions 2011-10-21 22:53:49 -07:00
wait321 f9b3b24983 added mono tribal deck generator. removed goblin deck generator (too weak). made deck generators create new instance for every get so tribal deck is reset 2011-10-21 22:35:25 -07:00