magarena/src/magic
Bilbo a6e97873fd Optimize mesage generation.
* Use faster stringbuilder for card token formatting instead of full-blown formatter.
* When SN/RN/PN and similar placeholders are expanded, calculate the replacement
  value only if the placeholder is present in the string.
   In a test with some random games:
    55.4M times replaceName was called
    39.2M times SN was present
     2.0M times PN was present
     0.2M times RN was present
     0.2M times X was present
* Generate event description on demand, instead on event construction.
   In a test with some random games:
   71.601M times description is generated
    0.258M time it is actually read or used
 By postponing generating the description to a point when it is actually needed,
 CPU time spent when going through possible actions is reduced to about 80%,
 so in given amount of time, MMAB AI and similar
 is able to examine larger part of the possible game states.
2019-12-13 05:25:23 +01:00
..
ai add comment on how robust child was chosen 2018-06-06 10:20:26 +08:00
awt copy card name on ctrl- or command-c from selected row in explorer, deck editor, etc. 2017-07-18 18:05:44 +01:00
cardBuilder include Nyx frames 2018-08-09 13:11:36 +01:00
data Fix exception when attempting to open file or directory 2019-12-03 07:02:09 +01:00
exception use existing ScriptParseException instead of FilterParseException 2018-04-01 12:47:33 +08:00
firemind Refactoring (#1543) 2018-04-08 08:59:14 +08:00
game/state Refactoring (#1543) 2018-04-08 08:59:14 +08:00
generator Refactoring (#1543) 2018-04-08 08:59:14 +08:00
headless remove trailing space from java code 2015-12-31 18:54:52 +08:00
model Optimize mesage generation. 2019-12-13 05:25:23 +01:00
test Add "card test" mode that tests all cards in a predefined scenario. 2019-12-06 23:04:39 +01:00
translate Refactoring (#1543) 2018-04-08 08:59:14 +08:00
ui Fix exception when attempting to open file or directory 2019-12-03 07:02:09 +01:00
utility bump version to 1.95 2018-11-12 21:40:52 +08:00
CardTest.java Print total time and time per card at end of the test. 2019-12-08 09:08:47 +01:00
CommandLineArgs.java Add ability to skip cards for the test. 2019-12-08 09:08:15 +01:00
DeckStrCal.java Refactoring (#1543) 2018-04-08 08:59:14 +08:00
FiremindQueueWorker.java shut down firemind queue worker when magarena exits (#1589) 2018-06-14 14:08:19 +08:00
HeadlessAIGame.java Configurable time limits for running AI game. (#1505) 2018-03-18 10:40:19 +08:00
MagicMain.java Add "card test" mode that tests all cards in a predefined scenario. 2019-12-06 23:04:39 +01:00