Commit Graph

25 Commits (master)

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
lodici 2660653acb adds "--threads" command line arg to limit threads used by AI when running simulated games. 2017-05-09 23:02:55 +01:00
melvinzhang 039e39c9f3 remove AI specific methods from PlayerProfile, add MagicPlayer.getAiProfile convenience method 2015-04-04 21:46:34 +08:00
melvinzhang 147be0efdc retrieve AI level from player profile 2015-04-04 21:46:33 +08:00
melvinzhang 9ba1ce1956 remove unused instance member, random 2015-03-08 20:44:07 +08:00
ShawnieBoy b611eaae48 Import reorganise/remove unused 2014-04-18 22:43:01 +01:00
melvin b69b37f986 AIs to only log in game.log and stop printing to std err 2014-04-01 19:39:28 +08:00
melvin f6233ac7c6 replace MersenneTwisterFast with Xorshift 2013-09-24 11:55:52 +08:00
melvin 64368e1b9a remove extraneous whitespace 2013-06-24 09:33:35 +08:00
melvin a60d22b65b simplify AI constructors 2013-04-30 13:19:35 +08:00
melvin f1b27c586c convert to UNIX line endings 2013-04-13 10:32:25 +08:00
melvin 7bbb16cd65 compute endTime in run method 2013-04-10 21:20:24 +08:00
melvin 7c1bc924a2 randomize hidden card if not cheating 2013-04-05 10:15:03 +08:00
melvin 55f39c237e added ability to configure cheat and logging for Vegas 2013-04-05 09:59:54 +08:00
melvin cc4577b280 ensure Vegas AI takes at most artificial level + 1 seconds to make each move 2013-04-04 21:55:40 +08:00
melvin e91d7d5203 rename setKnownCards to hideHiddenCards, handle thread interruption in MMABWorker 2013-03-10 09:32:27 +08:00
melvin c5da1d2a02 convert tab to four spaces 2012-08-26 16:54:43 +08:00
melvin 4167af70aa throw RuntimeException if there are no choices 2011-08-29 15:44:23 +08:00
melvin 850d01d3d1 optimized import statements with IntelliJ 2011-08-10 23:28:35 +08:00
melvin f59ba1d693 documented each try block for more systematic exception handling 2011-08-06 10:49:03 +08:00
melvin 59fdcf86cc added two strength variables so that it will be possible to pit AI of different strengths against each other in the CLI deck strength calculator 2011-06-14 11:41:14 +08:00
melvin 4b1fc68412 use MagicRandom to seed the new Random objects for each worker 2011-06-04 16:51:33 +08:00
melvin cf536670af MagicRandom now uses seed defined by system property rndSeed if it is given, refactor other programs to use MagicRandom instead of creating their own rng 2011-05-27 15:36:29 +08:00
ubeefx eb7cfc4eb4 Vegas AI. 2011-04-10 17:05:51 +00:00