Add explanation to the TenhouRecord.game_list.events
canuse opened this issue · 3 comments
canuse commented
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'.
Ledenel commented
Now the element 'event' is just plain XML Element parsed by native Python library xml.etree.ElementTree
.
for better representation, we could:
- add a wrapper, somthing like
TenhouEvent
for the XML Element. - in
TenhouEvent
delegate everything to thet real XML Element. - add some helper function and represention like
__str__
and__repr__
. - hack this point to ensure wrap any XML Element to
TenhouEvent
.
Ledenel commented