Description:
Add basic infrastructure to store and display visitor count.
May eventually move to simulating visitors as entities. We'll see.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
@@ -931,7 +931,7 | |||
|
931 | 931 | } |
|
932 | 932 | } |
|
933 | 933 | |
|
934 | String header_left = String.Format("${0:}|{1:} \ue124", this.simulation.money, this.simulation.map.tree_count); | |
|
934 | String header_left = String.Format("${0:}|{1:} \ue124|{2:} \ue12c", this.simulation.money, this.simulation.map.tree_count, this.simulation.visitor_count); | |
|
935 | 935 | String header_middle = String.Format("{0:MMMMM yyyy} ({1:})", this.simulation.DateTime, this.simulation.Season); |
|
936 | 936 | // String header_right = String.Format("Press H for help."); |
|
937 | 937 | String header_right = ""; |
@@ -36,11 +36,14 | |||
|
36 | 36 | public decimal cashflow; |
|
37 | 37 | |
|
38 | 38 | |
|
39 | //misc | |
|
39 | //misc trees | |
|
40 | 40 | public int trees; |
|
41 | 41 | public int dead_trees; |
|
42 | 42 | public int crowded_trees; |
|
43 | 43 | public int preserve_cells; |
|
44 | ||
|
45 | //misc | |
|
46 | public int visitor_count; | |
|
44 | 47 | //Kind of a hack but allows for tracking figures over time without creating a whole new infrastructure |
|
45 | 48 | |
|
46 | 49 | } |
@@ -115,6 +118,8 | |||
|
115 | 118 | |
|
116 | 119 | public int preserve_cells; |
|
117 | 120 | |
|
121 | public int visitor_count; | |
|
122 | ||
|
118 | 123 | public Budget latestBudget |
|
119 | 124 | { |
|
120 | 125 | get |
@@ -257,6 +262,7 | |||
|
257 | 262 | |
|
258 | 263 | this.map = new CellMap(width, height); |
|
259 | 264 | this.money = STARTING_FUNDS; |
|
265 | this.visitor_count = 0; | |
|
260 | 266 | this.millisecondsPerAdvance = millisecondsPerAdvance; |
|
261 | 267 | |
|
262 | 268 | this.paused = true; |
@@ -279,6 +285,7 | |||
|
279 | 285 | private void advanceSimulation() |
|
280 | 286 | { |
|
281 | 287 | var oldSeason = this.Season; |
|
288 | //Advance clock | |
|
282 | 289 | this.DateTime = this.DateTime.AddMonths(1); |
|
283 | 290 | this.Subsidy = Math.Max(0, this.Subsidy + this.SubsidyDelta); |
|
284 | 291 | var newSeason = this.Season; |
@@ -363,7 +370,8 | |||
|
363 | 370 | tree_planting = this.tree_planting * Simulation.TREE_PLANT_COST, |
|
364 | 371 | tree_clearing = this.tree_clearing * Simulation.TREE_CLEAR_COST, |
|
365 | 372 | misc = this.misc, |
|
366 | preserve_cells = this.preserve_cells | |
|
373 | preserve_cells = this.preserve_cells, | |
|
374 | visitor_count = this.visitor_count | |
|
367 | 375 | }; |
|
368 | 376 | |
|
369 | 377 | newBudget = this.applyBudget(newBudget); ; |
You need to be logged in to leave comments.
Login now