[messages] Edit: Re: [Module Design] Counting card value
barbanera at fantafoot.com
Mon Jul 23 04:43:04 MST 2012
[This message has been edited.]
It might be possible to do something of the sort in a straightforward
manner with 3.2.0 by using Calculated properties and the beanshell
However, sticking with 3.1.x if your cards are in a deck you can first
of all turn on performing "counting of regular expressions" on the deck,
and export properties like:
Then your total will be given by the simple expression: $<deckname>_1s$
+ 2*$<deckname>_2s$ + 3*$<deckname>_3s$ + ...
For testing purposes you might want to print it out that total. However,
you cannot stick the above string in a text label because it won't work.
So, define some button with a right/left click command to set up a
global property with a bunch of "increment numeric value by" commands,
all firing on the same command: the first with $<deckname>_1s$, the
second and third with $<deckname>_2s$ etc. Then have the text label
print out the value of this global property instead.
Read this topic online here:
More information about the messages