Exemple #1
0
 def deserialize(cls, value: serialization_model, inflator: Inflator) -> Pool:
     return Pool(
         inflator.inflate_all(Printing, value['printings']),
         (
             Deck.deserialize(_value, inflator)
             for _value in
             value.get('decks', ())
         ),
     )
Exemple #2
0
 def deserialize(cls, value: serialization_model, inflator: Inflator) -> Cube:
     return cls(
         cubeables = itertools.chain(
             inflator.inflate_all(Printing, value['printings']),
             (
                 Trap.deserialize(trap, inflator)
                 for trap in
                 value.get('traps', ())
             ),
             (
                 Ticket.deserialize(ticket, inflator)
                 for ticket in
                 value.get('tickets', ())
             ),
             (
                 Purple.deserialize(purple, inflator)
                 for purple in
                 value.get('purples', ())
             ),
         )
     )
Exemple #3
0
 def deserialize(cls, value: serialization_model,
                 inflator: Inflator) -> 'Serializeable':
     return cls(
         ConstrainedNode.deserialize(value['before'], inflator),
         inflator.inflate_all(Printing, value['after']),
     )
Exemple #4
0
 def deserialize(cls, value: serialization_model,
                 inflator: Inflator) -> CardboardTicket:
     return cls(
         inflator.inflate_all(Cardboard, value['options']),
         value['name'],
     )
Exemple #5
0
 def deserialize(cls, value: serialization_model,
                 inflator: Inflator) -> Ticket:
     return cls(
         inflator.inflate_all(Printing, value['options']),
         value['name'],
     )
Exemple #6
0
 def deserialize(cls, value: serialization_model,
                 inflator: Inflator) -> CardboardSet:
     return cls(inflator.inflate_all(Cardboard, value['cardboards']))
Exemple #7
0
 def deserialize(cls, value: serialization_model,
                 inflator: Inflator) -> PrintingSet:
     return cls(inflator.inflate_all(Printing, value['printings']))