source: geniuswebcore/geniusweb/inform/Inform.py@ 59

Last change on this file since 59 was 59, checked in by Wouter Pasman, 3 years ago

#44 manual commit of first public release, because this will cause the dist directory to move

File size: 616 bytes
Line 
1from abc import ABC
2from pyson.JsonSubTypes import JsonSubTypes
3from pyson.JsonTypeInfo import JsonTypeInfo
4from pyson.JsonTypeInfo import Id,As
5
6@JsonSubTypes(["geniusweb.inform.Settings.Settings",\
7 "geniusweb.inform.YourTurn.YourTurn",\
8 "geniusweb.inform.ActionDone.ActionDone",\
9 "geniusweb.inform.Finished.Finished"])
10@JsonTypeInfo(use=Id.NAME, include=As.WRAPPER_OBJECT)
11class Inform(ABC):
12
13 '''
14 base class of all information sent to a Party
15 HACK for now this just extends dict, instead
16 of properly defining all subclasses.
17 '''
18
19 def __eq__(self, other):
20 return isinstance(other, self.__class__)
Note: See TracBrowser for help on using the repository browser.