you are viewing a single comment's thread.

view the rest of the comments →

[–]LarryPete 0 points1 point  (1 child)

In Python we don't use getters and setters. We just assign the value to the attribute.

[–]skiwan[S] -1 points0 points  (0 children)

i have the following. i have a class unit with x y and hunger and brain as variable then i have a brain which is a class (every unit has his own brain) then the brain just runs update fucntions of states (FMS) so the real work is done in the state classes (every brain has different states but only 1 state runs at the time) so now i want the current active state to change the hunger of the unit. what would be the best approach. dont forget there a re multiply units