source: geniuswebcore/geniusweb/actions/Action.py@ 84

Last change on this file since 84 was 84, checked in by Bart Vastenhouw, 3 years ago

Added time-dependent parties for python and simpleRunner-GUI for java

File size: 900 bytes
Line 
1from abc import ABC, abstractmethod
2
3from pyson.JsonSubTypes import JsonSubTypes
4from pyson.JsonTypeInfo import Id, As
5from pyson.JsonTypeInfo import JsonTypeInfo
6
7from 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 "geniusweb.actions.Vote.Vote",\
15 "geniusweb.actions.Votes.Votes",\
16 ])
17@JsonTypeInfo(use=Id.NAME, include=As.WRAPPER_OBJECT)
18class Action (ABC):
19 '''
20 An action represents a "promise" made by a participant in the negotiation. It
21 can not be retracted and is immutable. But it can be followed by other
22 actions that override it or make it outdated.
23 HACK for now this just extends dict intead of defining proper subclasses
24 '''
25 @abstractmethod
26 def getActor(self) -> PartyId:
27 pass
28
29
30
Note: See TracBrowser for help on using the repository browser.