The Daily Commit 3 - 03/06/13

Fixed that TypeError problem. I’m so used to case-blind Pascal that I miss a lot of variable case inconsistencies.

The tool now randomly distributes people based on the value of land! I need a way of better visualizing this information though. Right now, it’s very difficult to get anything out of it, besides knowing that it’s working.

image

10x10 Town with 30 Citizens. The matrix shows the plot land value.

Read More

The Daily Commit 2

Added the function to place citizen in the plot they were randomly assigned to. Unfortunately, I’m getting some TypeErrors elsewhere. It’s pretty late and I think these will have to be addressed at a future date.

Read More

The Daily Commit 1 - 30/05/13

So far, City Builder only does a few things:

  • Generate a list of people with a distribution of wealths around an average, it 
  • Build a grid of land plots with a base “value”
  • When a citizen is put into a plot, increase the value of the plots around it

The steps today were to start the algorithm that decides where to place each citizen. It creates a list that contains all of the plots in the grid. As each plot is added to the list, a Probability Counter increments by the value of the plot. When a citizen is being place, a random number is generated, less than the end value of the counter. If the random number is <=Vplot1 (value of the first plot), then the first plot is chose. If the number is >Vplot1 but <=(Vplot2+Vplot1) then the 2nd plot is chosen, and so on.

This isn’t completely finished, but the start is there.

GitHub

Read More