Skip to content

Commit 624eb0a

Browse files
committed
chore: Add LastMove dataclass
1 parent 785e70a commit 624eb0a

File tree

1 file changed

+57
-3
lines changed

1 file changed

+57
-3
lines changed

python/socha/api/protocol/protocol.py

Lines changed: 57 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,39 @@ class Meta:
8080
value: str = field(default='')
8181

8282

83+
@dataclass
84+
class LastMove:
85+
class Meta:
86+
name = 'lastMove'
87+
88+
class_value: Optional[str] = field(
89+
default=None,
90+
metadata={
91+
'name': 'class',
92+
'type': 'Attribute',
93+
'required': True,
94+
},
95+
)
96+
distance: Optional[int] = field(
97+
default=None,
98+
metadata={
99+
'type': 'Attribute',
100+
},
101+
)
102+
card: Optional[str] = field(
103+
default=None,
104+
metadata={
105+
'type': 'Element',
106+
},
107+
)
108+
amount: Optional[int] = field(
109+
default=None,
110+
metadata={
111+
'type': 'Attribute',
112+
},
113+
)
114+
115+
83116
@dataclass
84117
class Hare:
85118
class Meta:
@@ -181,11 +214,17 @@ class Meta:
181214
hare: List[Hare] = field(
182215
default_factory=list,
183216
metadata={
184-
'name': 'hare',
185217
'type': 'Element',
186218
'min_occurs': 1,
187219
},
188220
)
221+
last_move: Optional[LastMove] = field(
222+
default=None,
223+
metadata={
224+
'name': 'lastMove',
225+
'type': 'Element',
226+
},
227+
)
189228

190229

191230
@dataclass
@@ -229,6 +268,21 @@ class Meta:
229268
)
230269

231270

271+
@dataclass
272+
class Joined:
273+
class Meta:
274+
name = 'joined'
275+
276+
room_id: Optional[str] = field(
277+
default=None,
278+
metadata={
279+
'name': 'roomId',
280+
'type': 'Attribute',
281+
'required': True,
282+
},
283+
)
284+
285+
232286
@dataclass
233287
class Left(ProtocolPacket):
234288
"""
@@ -701,8 +755,8 @@ class Meta:
701755
'required': True,
702756
},
703757
)
704-
cards: Optional[Cards] = field(
705-
default=None,
758+
card: List[str] = field(
759+
default_factory=list,
706760
metadata={
707761
'type': 'Element',
708762
},

0 commit comments

Comments
 (0)