Class Election
- java.lang.Object
-
- ch.sahits.game.openpatrician.model.city.cityhall.impl.Election
-
- All Implemented Interfaces:
IElectionResult
public class Election extends java.lang.Object implements IElectionResult
- Author:
- Andi Hotz, (c) Sahits GmbH, 2015 Created on Apr 06, 2015
-
-
Field Summary
Fields Modifier and Type Field Description private EElectionType
type
private java.util.Map<ICitizen,java.lang.Integer>
votes
-
Constructor Summary
Constructors Constructor Description Election(EElectionType type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
vote(ICitizen citizen)
Vote for citizen.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ch.sahits.game.openpatrician.model.city.cityhall.IElectionResult
getVotes
-
-
-
-
Field Detail
-
type
private final EElectionType type
-
votes
private java.util.Map<ICitizen,java.lang.Integer> votes
-
-
Constructor Detail
-
Election
public Election(EElectionType type)
-
-
Method Detail
-
vote
public void vote(ICitizen citizen)
Description copied from interface:IElectionResult
Vote for citizen.- Specified by:
vote
in interfaceIElectionResult
- Parameters:
citizen
- for whom to vote.
-
-