Methapolis  0.27
 All Classes Namespaces Files Functions Variables Enumerator
PlayerInput.java
Go to the documentation of this file.
1 package micropolisj.network;
2 
3 import java.io.Serializable;
4 
5 import micropolisj.engine.ToolStroke;
6 
12 public class PlayerInput implements Serializable{
13 
14  //TODO allow inputs other than tools
15 
18 
19 
20 
21  public PlayerInput(ToolStroke tool) {
22  toolStroke = tool;
23  }
24 
26  return toolStroke;
27  }
28 
29  public void setBudgetNumbers(int cityTax, double roadPercent, double policePct, double firePct, double researchPct) {
30  budgetNumbers = new BudgetInput();
31  budgetNumbers.cityTax = cityTax;
32  budgetNumbers.roadPercent = roadPercent;
33  budgetNumbers.policePercent = policePct;
34  budgetNumbers.firePercent = firePct;
35  budgetNumbers.researchPercent = researchPct;
36  }
37 
38  public class BudgetInput implements Serializable{
39  public int cityTax;
40  public double roadPercent;
41  public double policePercent;
42  public double firePercent;
43  public double researchPercent;
44  }
45 
47  return budgetNumbers;
48  }
49 }