Food Force/Meeting Logs3: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
(replace with more readable version)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
[Category:Health]
#olpc-foodforce
#olpc-foodforce


Participants:
[INFO] Channel view for “#olpc-foodforce” opened.


'''MurielGodoi, deepank, Anubhav'''
-->| YOU (deepank) have joined #olpc-foodforce


'''<deepank>'''There is one more thing that I would like to discuss about. There is no population parameter in the game. So, are we going to assume a constant population for the village or should we take it as a parameter. High growth rates of population in countries like India and Brazil is one reason why there are frequent draughts and famines.
=-= Mode #olpc-foodforce +ns by niven.freenode.net


'''<Anubhav>'''yes sir, We beliebe that their should be some population paramter that should be displayed during gameplay. A rise in population would then demand for more facilities, thus making the game more of real life simulation game.
-->| Anubhav (n=chatzill@221.134.239.87) has joined #olpc-foodforce


'''<MurielGodoi>'''At once I also though that... it is important, but I think we can assume a constant population in our first version
<Anubhav> Hi deepank


'''<deepank>'''Ok we can keep it as a feature to be added; but it can be easily added ... and can depend on the level of education and family control measures being taken
<deepank> Hi


'''<MurielGodoi>'''it is easily added but not so simple to code the effects.
<Anubhav> Still no one, this is not good


'''<deepank>'''If a human being is being represented by an object the number of instances of human being object can be directly proportional to population
<deepank> Lets wait for others ....


'''<Anubhav>'''I was thinking of the same, because the code needs to be changed a lot when we add that growing population factor, as it will have many dependencies with it
<deepank> yea ..... do sum other wrk while keeping this window open


==Class Diagram==
<Anubhav> affirmative


'''<Anubhav>'''we had made the class diagram on paper. Please check it
-->| MurielGodoi (n=msgodoi@189-68-25-237.dsl.telesp.net.br) has joined #olpc-foodforce


'''<MurielGodoi>'''The image is not so clear, but from that I can read, why is indicator just related to facilities? s/facilities/resources
<deepank> Hi Muriel


'''<deepank>'''Indicator is related to resources only and not to facilties. we thought that facilities will contribute to resources and thus indirectly to indicaors
<MurielGodoi> hi Deepank, hi Anubhav


'''<MurielGodoi>'''s/facilities/resources means replace facilities for indicator.. i
<Anubhav> Hello sir

<deepank> I will send you the class diagram's scanned pic thru email

<deepank> please tell us if we are going wrong somewhere

<MurielGodoi> ok

<Anubhav> yes sir, we had made the class diagram on paper. Please check it

<deepank> There is one more thing that I would like to discuss about.

<MurielGodoi> sure, what it is about?

<deepank> There is no population parameter in the game

<deepank> So, are we going to assume a constant population for the village or should we take it as a parameter

<Anubhav> yes sir, We beliebe that their should be some population paramter that should be displayed during gameplay.

=== murielgodoi is online.

<Anubhav> A rise in population would then demand for more facilities, thus making the game more of real life simualtion game

<deepank> High growth rates of population in countries like India and Brazil is one reason why there are frequent draughts

<deepank> and famines

<MurielGodoi> At once I also though that... it is important, but I think we can assume a constant population in our first version

<deepank> Ok we can keep it as a feature to be added; but it can be easily added ... and can depend on the level of education and family control measures being taken

<MurielGodoi> it is easily added but not so simple to code the effects.

<Anubhav> yes sir, I was thinking of the same,

<deepank> Actually I did not take a look at the code of the human beings
moving around.... am i missing something

<deepank> If a human being is being represented by an object

<Anubhav> because the code needs to be changed a lot when we add that growing population factor , as it will have many dependencies with it

<deepank> the number of instances of human being object can be directly proportional to population

<MurielGodoi> sure it is. In that animation I was just testing the perfomance

<Anubhav> @Deepank: have you mailed the Class Diagram to sir

<deepank> yes

* MurielGodoi is cheking...

<MurielGodoi> The image is not so clear, but from that I can read..

<MurielGodoi> why is indicator just related to facilities?

<MurielGodoi> s/facilities/resources

<deepank> Indicator is related to resources only and not to facilties

<deepank> we thought that facilities will contribute to resources

<deepank> and thus indirectly to indicaors

<MurielGodoi> s/facilities/resources means replace facilities for indicator.. i
typed wrong
typed wrong


'''<deepank>'''Muriel: buying or selling resources will automatically relate to indicators.
<MurielGodoi> deepank: so for us desn't matter that we buy or produce a resource

<MurielGodoi> ?

-->| Anubhav_Agarwal (n=chatzill@221.134.239.87) has joined #olpc-foodforce

<deepank> Muriel: buying or selling resources will automatically relate to indicators.

<MurielGodoi> the village stock is different from having infra-structure

<MurielGodoi> mainly to health... we can have medicines and do not have an hospital

<deepank> Right

<MurielGodoi> so hospital should have effects in health indicator

<MurielGodoi> I think indicator should relate both... resource and facilities

<deepank> right

<Anubhav_Agarwal> joinyes

<Anubhav_Agarwal> yes

<MurielGodoi> and facilities are more important (more weigh ) than resources

<deepank> ok


<MurielGodoi> we also need to check the relation type
'''<MurielGodoi>'''the village stock is different from having infra-structure


'''<MurielGodoi>'''mainly to health... we can have medicines and do not have an hospital, so hospital should have effects in health indicator, I think indicator should relate both... resource and facilities. And facilities are more important (more weigh) than resources. We also need to check the relation type,composition or aggregation.
<MurielGodoi> composition or aggregation


<deepank> Yes that was one thing in which I wanted to take your opinion
'''<deepank>'''Yes that was one thing in which I wanted to take your opinion


<MurielGodoi> I am checking my software engenniring... my last class about that was 6 years ago :)
'''<MurielGodoi>'''I am checking my software engenniring... my last class about that was 6 years ago :)


<deepank> What do you think
'''<deepank>'''What do you think


<deepank> I was thinking of a main container class containing all these
'''<deepank>'''I was thinking of a main container class containing all these
objects and helping integration among all these
objects and helping integration among all these


<MurielGodoi> maybe just association. with labels and multiplicity?
'''<MurielGodoi>'''maybe just association. with labels and multiplicity?


<deepank> n:1 everywhere
'''<deepank>'''n:1 everywhere


<deepank> as n resources and n indicators affect 1 indicator
'''<deepank>'''as n resources and n indicators affect 1 indicator


<MurielGodoi> maybe not
'''<MurielGodoi>'''maybe not


<MurielGodoi> houses can affect housing and health
'''<MurielGodoi>'''houses can affect housing and health


<deepank> Right
'''<deepank>'''Right


<deepank> I overlooked that
'''<deepank>'''I overlooked that


<deepank> How do we model it in Python
'''<deepank>'''How do we model it in Python


<MurielGodoi> for instance. Health indicator can have an array of (facility, weight) tuples
'''<MurielGodoi>'''for instance. Health indicator can have an array of (facility, weight) tuples and another one for resources. Putting weights on it we can balance the importance of facilities and resources stock in the indicator.


'''<deepank>'''yes
<MurielGodoi> and another one for resources


'''<MurielGodoi>'''Could someone list for me the Resources methods, I can't read it here.
<deepank> yes


'''<deepank>'''
<MurielGodoi> putting weighs on it we can balance the importance of facilities and resources stock in the indicator


Update_Value(string name, int value)
<deepank> yes


void Buy(String name, int value)
<MurielGodoi> Could someone list for me the Resources methods, I can't read it here.


<deepank> Update_Value(string name, int value)
void Sell(String name, int value)


int GetValue()
<deepank> void Buy(String name, int value)


void SetValue()
<deepank> void Sell(String name, int value)


'''<MurielGodoi>'''by value you mean, price or quantity?
<deepank> int GetValue()


<deepank> void SetValue()
'''<deepank>'''quantity


<MurielGodoi> by value you mean, price or quantity?
'''<MurielGodoi>'''value is a generic name.. try to make attributes name as clear as possible


'''<Anubhav>'''we wont be changing the price I believe
<deepank> quantity


'''<MurielGodoi>'''Anubhav: What happens to the price when we have low quantity of some
<Anubhav> quantity

<MurielGodoi> value is a generic name.. try to make attributes name as clear as possible

<Anubhav> we wont be changing the price I believe

<deepank> ok

<MurielGodoi> Anubhav: What happens to the price when we have low quantity of some
product on sale?
product on sale?


<Anubhav> price goes up
'''<Anubhav>'''price goes up, in the market as demand is more , supply is less


'''<MurielGodoi>'''perfect, I am trying to make you think about the scenario, not just give you the answers
<Anubhav> in the market as demand is more , supply is less


<MurielGodoi> perfect, I am trying to make you think about the scenario, not give you just the answers
'''<MurielGodoi>'''about the model... think about what you modeled in Resources class. It is a unique resouce or a entire stock?


'''<deepank>'''entire stock of a resource
<MurielGodoi> about the model... think about what you modeled in Resouces class. It is a unique resouce or a entire stock?


<deepank> entire stock of a resource
'''<Anubhav>'''each object will be 1 resource


'''<deepank>'''i.e. Wood has one object and it represents entire stock of the village
<Anubhav> each object will be 1 resource


'''<MurielGodoi>'''so why did you add name in all methods? In Resource there is a mix of Resource and stock methods
<deepank> i.e. Wood has one object.


<deepank> and it represents entire stock of the village
'''<deepank>'''Wood is the name of the resource


'''<deepank>'''What is the difference between the two?
<MurielGodoi> so why did you add name in all methods?


<MurielGodoi> in Resource there is a mix of Resouce and stock methods
'''<MurielGodoi>'''deepank: but in that object do you have just a string to save that


'''<deepank>'''Yes, or we can change it to a global enum for saving memory.
<deepank> Wood is the name of the resource


'''<MurielGodoi>'''deepank: so how will you handle several resources there
<deepank> What is the difference between the two?


'''<deepank>'''Each resource will have one object; with a name associated with it
<MurielGodoi> deepank: but in that object do you have just a string to save that


'''<MurielGodoi>'''at first every class name should be in singular otherwise you be
<deepank> Yes, or we can change it to a global enum for saving memory.

<MurielGodoi> deepank: so how will you handle several resources there

<deepank> Each resource will have one object; with a name associated with it

<MurielGodoi> at first every class name should be in singular otherwise you be
modeling a group, not a object
modeling a group, not a object


<MurielGodoi> deepank: object or instance?
'''<MurielGodoi>'''deepank: object or instance?

<deepank> We have a class Resource.


'''<deepank>'''We have a class Resource.
<deepank> Now it has object - Wood with name as wood and value as quantity


'''<deepank>'''Now it has object - Wood with name as wood and value as quantity
<deepank> Another Object Food


'''<deepank>'''Another Object Food
<MurielGodoi> so you will create 1 instance for each resource


'''<MurielGodoi>'''so you will create 1 instance for each resource?
<deepank> similarly and so on


<deepank> yes
'''<deepank>'''yes


<MurielGodoi> if each resource have you own instance why you need name in all
'''<MurielGodoi>'''if each resource have you own instance why you need name in all
methods
methods


<MurielGodoi> food = Resouce('food', 15)
food = Resource('food', 15)


<MurielGodoi> food.setValue('food', 20)
food.setValue('food', 20)


'''<deepank>'''Actually we are introducing redundancy. We will remove the name.
<deepank> Yes


'''<MurielGodoi>'''I think a class for stock should be fine. I do not understand the difference between resource and stock. stock is a set of resources, not just one
<deepank> Actually we are introducing redundancy


<deepank> we will remove the name
'''<deepank>'''Yes, then we can keep name as a parameter


'''<MurielGodoi>'''you just need to decide between model a stock or resources. if you are modeling a stock so you should keep the name parameter
<MurielGodoi> deepank: you got it


'''<deepank>'''If we keep stock, then we will need to make all the parameters as
<MurielGodoi> I think a class for stock should be fine

<deepank> I do not understand the difference between resource and stock

<MurielGodoi> stock is a set of resources

<MurielGodoi> not just one

<deepank> Yes, then we can keep name as a parameter

<MurielGodoi> you just need to decide beetwen model a stock or resources

<MurielGodoi> if you are modeling a stock so you should keep the name parameter

<MurielGodoi> that's happened to Anubhav

<MurielGodoi> ?

<MurielGodoi> ok

<deepank> If we keep stock, then we will need to make all the parameters as
arrays
arrays


'''<MurielGodoi>'''i think you are inclined to model a stock. in that case, you should rename your class as stock and stock should have a list of tuples (resource, quantity)
<deepank> Anubhav is facing net problems

<MurielGodoi> ok... sometimes I also face it in Brazil

<MurielGodoi> i think you are inclined to model a stock

<MurielGodoi> in that case, you should rename your class as stock


<deepank> No on the contrary, I think I should model as resource only, my
'''<deepank>'''No on the contrary, I think I should model as resource only, my
habit of C programming is coming in the way :)
habit of C programming is coming in the way :)


<MurielGodoi> and stock should have a list of tuples (resouce, quantity)
'''<MurielGodoi>'''so, you should rename you class to Resource (not Resources) and
remove name from the methods


'''<deepank>'''Yes
<MurielGodoi> so, you should rename you class to Resource (not Resources) and
remove name from the methos


'''<MurielGodoi>'''you should realize that there is no unique solution when modeling
<deepank> Yes


'''<deepank>'''So, the changes are:
<MurielGodoi> you should realize that there is no unique solution when modeling
1. Association from Facilities to Indicator
2. Remove name as a parameter
3. Introduce a model to change prices


<deepank> So, the changes are :


'''<MurielGodoi>'''we will need to instantiate two list of resources: 1 for the village, 1 for the market. Each one should have their own quantity and unit price
<deepank> 1. Association from Facilities to Indicator


<deepank> 2. Remove name as a parameter
'''<deepank>'''but price will be decided in the market


'''<MurielGodoi>'''deepank: The game engine will change that
<Anubhav> yes


==Facilities==
<deepank> 3. Introduce a model to change prices


'''<MurielGodoi>'''each facilities have a list of produced and consumed resources on
<Anubhav> ok
each turn. we should model that.


'''<deepank>'''
<MurielGodoi> we will need to instantiate two list of resouces:


void update_level(void)
<MurielGodoi> 1 for the village


void update_number(int)
<MurielGodoi> 1 for the market


'''<deepank>'''name should be removed
<MurielGodoi> each one should have their own quantity and unit price


'''<MurielGodoi>'''deepank: perfect.. the same case... are you modeling a Facility not
<deepank> yes

<MurielGodoi> everything okay about resoures?

<deepank> but price will be decided in the market

<deepank> oh sorry got confused

<deepank> yes

<MurielGodoi> deepank: The game enngine will chenge that

<MurielGodoi> about facilities

<deepank> Yes

<MurielGodoi> each facilities have a list of produced and consumed resources on
each turn

<MurielGodoi> we should model that

<deepank> void update_level(void)

<deepank> void update_number(int)

<deepank> name should be removed

<MurielGodoi> deepank: perfect.. the same case... are you modeling a Facilitie not
the entire city
the entire city


<MurielGodoi> facility.addProduction('rice', 100)
facility.addProduction('rice', 100)


<MurielGodoi> facility.addProduction('beans', 64)
facility.addProduction('beans', 64)


<MurielGodoi> facility.remProduction('beans')
facility.remProduction('beans')


<MurielGodoi> facility.addConsumption('beans', 20)
facility.addConsumption('beans', 20)


<MurielGodoi> and so on
and so on


<deepank> We have not added any production methods
'''<deepank>'''We have not added any production methods. Will a user be able to define this?


'''<MurielGodoi>'''not the user... the game engine, that is your next step after the model. the game engine will perform the changes on each turn.. update resources, prices, facilities and indicators
<deepank> Will a user be able to define this?


'''<deepank>'''Should a game engine decide that rice is to be grown and that too in
<MurielGodoi> not the user... the game engine

<MurielGodoi> that is your next step after the model

<MurielGodoi> the game engine will perform the changes on each turn.. update
resources, prices, facilities and indicators

<deepank> Should a game engine decide that rice is to be grown and that too in
a particular quantity? We were taking a single food item :)
a particular quantity? We were taking a single food item :)


<MurielGodoi> the animation and gui elements will read these that and update the
'''<MurielGodoi>'''the animation and gui elements will read these that and update the
screen. the user will invest on rice farm, but the rice production will be calculate by the game engine, so we can set variables like season, training, weather. now we are working on the model which will store the game data
screen


'''<deepank>'''yes we can introduce weather and seasonal changes in the game
<deepank> yes.


<MurielGodoi> the user will invest on rice farm
'''<MurielGodoi>'''the game engine will contain the definitions to change it


'''<deepank>'''So, I think Facility is fine; we need to remove the name.
<MurielGodoi> but the rice production will be calculate by the game engine


'''<MurielGodoi>'''and add the methods above to allow game engine set it. facilities and Indicators should have the method 'turn', the game engine will can it to all facilities, which will update
<deepank> yes
resources


'''<deepank>'''the update_value function is working as next_turn
<deepank> which will depend on the trainig of the villagers


<MurielGodoi> so we can set variables like season, training, weather
'''<MurielGodoi>'''nice, so just rename it to next_turn, it is a clear name


<MurielGodoi> perfect


==Indicator==
<MurielGodoi> now we are working on the model which will store the game data


'''<MurielGodoi>'''the same for the name in methods and add methods to set the weights
<deepank> yes we can introduce weather and seasonal changes in the game


health_indicator.addWeight('hospital', 50)
<MurielGodoi> the game engine will contain the definitions to change it


health_indicator.addWeight('housing ', 20)
<deepank> So, I think Facility is fine; we need to remove the name.


'''<deepank>'''Weights are static information?
<MurielGodoi> and add the methods above too


'''<MurielGodoi>'''yep, they will allow us better balance the game further
<deepank> Yes


<MurielGodoi> to allow game engine set it


'''<MurielGodoi>'''Have you learned Model-View-Control model? View will be the animation and gui. model is that we are doing now and control will be the game engine
<MurielGodoi> facilities and Indicators should have the method 'turn'


'''<deepank>'''No, not in the formal course studies. Can you give me some links for
<MurielGodoi> the game engine will can it to all facilities, which will update
resouces

<deepank> the update_value function is working as next_turn

<MurielGodoi> nice, so just rename it to next_turn, it is a clear name

<deepank> ok

<MurielGodoi> Missed I something?

<deepank> I do not think so, only Indicator left to discuss

<MurielGodoi> sure....

<MurielGodoi> the same for the name in methods

<deepank> yes

<MurielGodoi> and add methods to set the weights

<MurielGodoi> health_indicator.addWeight('hospital', 50)

<MurielGodoi> health_indicator.addWeight('housing ', 20)

<deepank> Weights are static information

<MurielGodoi> yep

<MurielGodoi> they will allow us better balance the game further

<deepank> ok.

<MurielGodoi> we are done about the diagram?

<MurielGodoi> are we done about the diagram?

<deepank> Yes, we will make a new diagram incorporating changes and also make
the code now

<Anubhav___> ok

<MurielGodoi> about the repository

<deepank> did you get any replies

<MurielGodoi> nop

<MurielGodoi> ivan is a security chief and is also handling all repository request

<MurielGodoi> olpc was going to get a guy for that, but I donno how is it now

<deepank> Ok, so please tell us when the repository is setup.

<MurielGodoi> ok

<MurielGodoi> Anything else?

<deepank> Let us decide a meeting day. When will you be free for the next
meeting

<MurielGodoi> An note, as you have been already noticed, my English isn't so good,
I am trying to improve it, so I apologise if I seen rude in any talk, that wasn't my
intention

<MurielGodoi> When you think you can update the diagram model and do the changes
in the code?

<deepank> No you haven't been rude. Yes, sometimes, I do misunderstand your
comments though :)

<deepank> I can do it till day after tomorrow. I am going for a competition
tomorrow; so won't get much time

<MurielGodoi> deepank: ok sorry, i will try to be more clear to minimize it,
thanks for the comment

<MurielGodoi> monday?

<deepank> Yes Monday is fine for me, in the meantime, tell me about the game
engine, so I can get acquainted with the current code.

<MurielGodoi> ok.. will try to think more about how to do that.

<MurielGodoi> I still don't have that clear in mind

<deepank> Ok. I will think about it too. We will discuss more on Monday

<MurielGodoi> Have you learned Model-View-Control model

<MurielGodoi> ?

<MurielGodoi> View will be the animation and gui

<MurielGodoi> model is that we are doing now

<deepank> No, not in the formal course studies. Can you give me some links for
it.
it.


<MurielGodoi> and control will be the game engine
'''<MurielGodoi>'''ok... I will find some links and mail you

<MurielGodoi> ok... I will find some links and mail you

<deepank> ok.

<deepank> Ok. So, we will meet again on Monday. Till then work for me :

<MurielGodoi> so next meeting monday 11:30est

<deepank> 1. Make code of model

<deepank> 2. Read up on links given by you

<deepank> Your work

<deepank> 1. Repository

<deepank> 2. Thinking about game engine

<MurielGodoi> 2. contact the artwork guys


'''<MurielGodoi>'''so next meeting monday 11:30est
<deepank> Yes


'''<deepank>'''
<MurielGodoi> and send oyu the links


1. Make code of model
<MurielGodoi> deepank: could you please attach the meetings log to wiki?


2. Read up on links given by you
<deepank> Yes i will do that


<MurielGodoi> thanks for all your work
'''<MurielGodoi>'''


1. Repository
<deepank> Thanks


2. Thinking about game engine
<MurielGodoi> the meeting is over


3. contact the artwork guys
<MurielGodoi> see you guys


<deepank> Good Night


[[Category:Health]]
<MurielGodoi> night
[[Category:Nutrition]]
[[Category:Software]]
[[Category:Games]]

Latest revision as of 04:26, 5 April 2008

  1. olpc-foodforce

Participants:

MurielGodoi, deepank, Anubhav

<deepank>There is one more thing that I would like to discuss about. There is no population parameter in the game. So, are we going to assume a constant population for the village or should we take it as a parameter. High growth rates of population in countries like India and Brazil is one reason why there are frequent draughts and famines.

<Anubhav>yes sir, We beliebe that their should be some population paramter that should be displayed during gameplay. A rise in population would then demand for more facilities, thus making the game more of real life simulation game.

<MurielGodoi>At once I also though that... it is important, but I think we can assume a constant population in our first version

<deepank>Ok we can keep it as a feature to be added; but it can be easily added ... and can depend on the level of education and family control measures being taken

<MurielGodoi>it is easily added but not so simple to code the effects.

<deepank>If a human being is being represented by an object the number of instances of human being object can be directly proportional to population

<Anubhav>I was thinking of the same, because the code needs to be changed a lot when we add that growing population factor, as it will have many dependencies with it

Class Diagram

<Anubhav>we had made the class diagram on paper. Please check it

<MurielGodoi>The image is not so clear, but from that I can read, why is indicator just related to facilities? s/facilities/resources

<deepank>Indicator is related to resources only and not to facilties. we thought that facilities will contribute to resources and thus indirectly to indicaors

<MurielGodoi>s/facilities/resources means replace facilities for indicator.. i typed wrong

<deepank>Muriel: buying or selling resources will automatically relate to indicators.

<MurielGodoi>the village stock is different from having infra-structure

<MurielGodoi>mainly to health... we can have medicines and do not have an hospital, so hospital should have effects in health indicator, I think indicator should relate both... resource and facilities. And facilities are more important (more weigh) than resources. We also need to check the relation type,composition or aggregation.

<deepank>Yes that was one thing in which I wanted to take your opinion

<MurielGodoi>I am checking my software engenniring... my last class about that was 6 years ago :)

<deepank>What do you think

<deepank>I was thinking of a main container class containing all these objects and helping integration among all these

<MurielGodoi>maybe just association. with labels and multiplicity?

<deepank>n:1 everywhere

<deepank>as n resources and n indicators affect 1 indicator

<MurielGodoi>maybe not

<MurielGodoi>houses can affect housing and health

<deepank>Right

<deepank>I overlooked that

<deepank>How do we model it in Python

<MurielGodoi>for instance. Health indicator can have an array of (facility, weight) tuples and another one for resources. Putting weights on it we can balance the importance of facilities and resources stock in the indicator.

<deepank>yes

<MurielGodoi>Could someone list for me the Resources methods, I can't read it here.

<deepank>

Update_Value(string name, int value)

void Buy(String name, int value)

void Sell(String name, int value)

int GetValue()

void SetValue()

<MurielGodoi>by value you mean, price or quantity?

<deepank>quantity

<MurielGodoi>value is a generic name.. try to make attributes name as clear as possible

<Anubhav>we wont be changing the price I believe

<MurielGodoi>Anubhav: What happens to the price when we have low quantity of some product on sale?

<Anubhav>price goes up, in the market as demand is more , supply is less

<MurielGodoi>perfect, I am trying to make you think about the scenario, not just give you the answers

<MurielGodoi>about the model... think about what you modeled in Resources class. It is a unique resouce or a entire stock?

<deepank>entire stock of a resource

<Anubhav>each object will be 1 resource

<deepank>i.e. Wood has one object and it represents entire stock of the village

<MurielGodoi>so why did you add name in all methods? In Resource there is a mix of Resource and stock methods

<deepank>Wood is the name of the resource

<deepank>What is the difference between the two?

<MurielGodoi>deepank: but in that object do you have just a string to save that

<deepank>Yes, or we can change it to a global enum for saving memory.

<MurielGodoi>deepank: so how will you handle several resources there

<deepank>Each resource will have one object; with a name associated with it

<MurielGodoi>at first every class name should be in singular otherwise you be modeling a group, not a object

<MurielGodoi>deepank: object or instance?

<deepank>We have a class Resource.

<deepank>Now it has object - Wood with name as wood and value as quantity

<deepank>Another Object Food

<MurielGodoi>so you will create 1 instance for each resource?

<deepank>yes

<MurielGodoi>if each resource have you own instance why you need name in all methods

food = Resource('food', 15)

food.setValue('food', 20)

<deepank>Actually we are introducing redundancy. We will remove the name.

<MurielGodoi>I think a class for stock should be fine. I do not understand the difference between resource and stock. stock is a set of resources, not just one

<deepank>Yes, then we can keep name as a parameter

<MurielGodoi>you just need to decide between model a stock or resources. if you are modeling a stock so you should keep the name parameter

<deepank>If we keep stock, then we will need to make all the parameters as arrays

<MurielGodoi>i think you are inclined to model a stock. in that case, you should rename your class as stock and stock should have a list of tuples (resource, quantity)

<deepank>No on the contrary, I think I should model as resource only, my habit of C programming is coming in the way :)

<MurielGodoi>so, you should rename you class to Resource (not Resources) and remove name from the methods

<deepank>Yes

<MurielGodoi>you should realize that there is no unique solution when modeling

<deepank>So, the changes are: 1. Association from Facilities to Indicator 2. Remove name as a parameter 3. Introduce a model to change prices


<MurielGodoi>we will need to instantiate two list of resources: 1 for the village, 1 for the market. Each one should have their own quantity and unit price

<deepank>but price will be decided in the market

<MurielGodoi>deepank: The game engine will change that

Facilities

<MurielGodoi>each facilities have a list of produced and consumed resources on each turn. we should model that.

<deepank>

void update_level(void)

void update_number(int)

<deepank>name should be removed

<MurielGodoi>deepank: perfect.. the same case... are you modeling a Facility not the entire city

facility.addProduction('rice', 100)

facility.addProduction('beans', 64)

facility.remProduction('beans')

facility.addConsumption('beans', 20)

and so on

<deepank>We have not added any production methods. Will a user be able to define this?

<MurielGodoi>not the user... the game engine, that is your next step after the model. the game engine will perform the changes on each turn.. update resources, prices, facilities and indicators

<deepank>Should a game engine decide that rice is to be grown and that too in a particular quantity? We were taking a single food item :)

<MurielGodoi>the animation and gui elements will read these that and update the screen. the user will invest on rice farm, but the rice production will be calculate by the game engine, so we can set variables like season, training, weather. now we are working on the model which will store the game data

<deepank>yes we can introduce weather and seasonal changes in the game

<MurielGodoi>the game engine will contain the definitions to change it

<deepank>So, I think Facility is fine; we need to remove the name.

<MurielGodoi>and add the methods above to allow game engine set it. facilities and Indicators should have the method 'turn', the game engine will can it to all facilities, which will update resources

<deepank>the update_value function is working as next_turn

<MurielGodoi>nice, so just rename it to next_turn, it is a clear name


Indicator

<MurielGodoi>the same for the name in methods and add methods to set the weights

health_indicator.addWeight('hospital', 50)

health_indicator.addWeight('housing ', 20)

<deepank>Weights are static information?

<MurielGodoi>yep, they will allow us better balance the game further


<MurielGodoi>Have you learned Model-View-Control model? View will be the animation and gui. model is that we are doing now and control will be the game engine

<deepank>No, not in the formal course studies. Can you give me some links for it.

<MurielGodoi>ok... I will find some links and mail you

<MurielGodoi>so next meeting monday 11:30est

<deepank>

1. Make code of model

2. Read up on links given by you

<MurielGodoi>

1. Repository

2. Thinking about game engine

3. contact the artwork guys