added name to citizen, changed houses

This commit is contained in:
2019-01-04 10:50:14 +01:00
parent 64a2c980dc
commit bb2551d76c

View File

@@ -5,13 +5,15 @@ boolean b_smallerImage = true; //use a cropped, smaller version of the 1920x1080
boolean b_loadSun = false; //load sun from web-api instead of local json file (local file is adressed to january 4th 2019. might implement a check that downloads today's information only once...
void mouseClicked(){
mensch.goTo(73);
mensch.goTo(112);
}
class Citizen{
int i_xSpawn, i_ySpawn, i_xPos, i_yPos, i_diameter;
boolean b_linked;
int i_home;
String S_name;
// berufsfeld: webdesigner, pädagoge, schmuckdesigner, schmied
// berufsstatus: beamter, selbstständiger, unternehmer, angestellter, grundschüler, gymnasiast, hauptschüler, realschüler, azubi, student, rentner
@@ -20,8 +22,9 @@ class Citizen{
//names of pathfinding algorithms: greedy best first search, uniform cost search, a star search
Citizen(int home){
Citizen(int home, String name){
i_home = home;
S_name = name;
i_diameter = 15;
}
@@ -44,6 +47,8 @@ class Citizen{
void display(){
ellipse(i_xPos, i_yPos, i_diameter, i_diameter);
textSize(10);
text(S_name, i_xPos, i_yPos-10);
}
}
@@ -66,8 +71,8 @@ void setup() {
initWeather();
mensch = new Citizen(112);
mensch.spawn(112);
mensch = new Citizen(59, "Pe");
mensch.spawn(59);
}
void draw() {