Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plant.timestep #7

Open
jenessalemon opened this issue Nov 16, 2016 · 1 comment
Open

plant.timestep #7

jenessalemon opened this issue Nov 16, 2016 · 1 comment

Comments

@jenessalemon
Copy link
Collaborator

jenessalemon commented Nov 16, 2016

@willpearse
After our conversation I worked on my plant.timestep function (line 66 in plants.R) but I'm not sure if I got closer or father away.
I am trying to take the char.matrix (which is now called plants) and loop through columns, and within each column loop through each row. Then I am trying to assign each cell of the terrain to plants, after applying the survive function to it. However, I don't have a terrain finished, so I don't know whether or not this is going to work.
I also still don't understand why on earth we would want the survive function to return a vector. What is the point of survive if we aren't adding any plants?
My plan is to Skype you tomorrow during office hours and try one more time to get this. If I don't I will just finishing debugging the package and be DONE with this!

@willpearse
Copy link
Member

You're focusing on the sentences and not on the story. There is no way I can answer your question except for telling you the story again.

You are looping over timesteps
With each timestep, you are calling the function plant.timestep.
plant.timestep loops across the rows and columns of a matrix, calling survive to replace each cell of that matrix with what will happen to its occupant in the next timestep.

The answer to your question is in this story. There is no answer to your question, because the phrase "aren't adding any plants" doesn't have meaning at the level of the survive function. It only has meaning at the level of the story, above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants