Last change
on this file since 63 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:
819 bytes
|
Line | |
---|
1 | from abc import ABC, abstractmethod
|
---|
2 |
|
---|
3 | from pyson.JsonSubTypes import JsonSubTypes
|
---|
4 | from pyson.JsonTypeInfo import Id, As
|
---|
5 | from pyson.JsonTypeInfo import JsonTypeInfo
|
---|
6 |
|
---|
7 | from geniusweb.actions.PartyId import PartyId
|
---|
8 |
|
---|
9 |
|
---|
10 | @JsonSubTypes(["geniusweb.actions.EndNegotiation.EndNegotiation",\
|
---|
11 | "geniusweb.actions.Offer.Offer",\
|
---|
12 | "geniusweb.actions.Accept.Accept",\
|
---|
13 | "geniusweb.actions.LearningDone.LearningDone"])
|
---|
14 | @JsonTypeInfo(use=Id.NAME, include=As.WRAPPER_OBJECT)
|
---|
15 | class Action (ABC):
|
---|
16 | '''
|
---|
17 | An action represents a "promise" made by a participant in the negotiation. It
|
---|
18 | can not be retracted and is immutable. But it can be followed by other
|
---|
19 | actions that override it or make it outdated.
|
---|
20 | HACK for now this just extends dict intead of defining proper subclasses
|
---|
21 | '''
|
---|
22 | @abstractmethod
|
---|
23 | def getActor(self) -> PartyId:
|
---|
24 | pass
|
---|
25 | |
---|
Note:
See
TracBrowser
for help on using the repository browser.