Ledenel/auto-white-reimu

Add explanation to the TenhouRecord.game_list.events

canuse opened this issue · 3 comments

The current format of element 'event', which is like 'D70', 'U128'... , is quite hard to understand. It might be more readable if there is an explanation, namely 'deal 1s', 'discard 1s'.

Now the element 'event' is just plain XML Element parsed by native Python library xml.etree.ElementTree .

for better representation, we could:

  1. add a wrapper, somthing like TenhouEvent for the XML Element.
  2. in TenhouEvent delegate everything to thet real XML Element.
  3. add some helper function and represention like __str__ and __repr__.
  4. hack this point to ensure wrap any XML Element to TenhouEvent.

Would be something like this:

image

implemented at #15 .