I am sorry this is a rather big PR but a lot of refactoring had been necessary to implement that. (And I took the opportunity to make the code cleaner).
This PR implement a way to initialise the game from the application so that user do not have to manually run the plantbreedgame_setup.Rmd file.
NOTE: for now user cannot specify the initialisation parameters, but this will be implemented soon.
@timflutre, I do not expect a complete review as it is quite big, and nothing seems to broke (thanks to the tests). However, I made one small change that I would like you to be aware of:
Before in the "theory menu" some boundaries of the inputs were specified using the game constants (mu.trait1, sigma.p2.trait1). Now since those values may not exist if the game is not initialised, I used fixed values instead (it was much easier to implement, and I use the same as what is in plantbreedgame_setup.Rmd).
That mean now the theory tab and the game's constant are disconnected.
Personally I think it is OK like that. I think that if this is just the "theory" there is no reason to have this linked to the actual game values. But if you would like it to be the case I can take some time to implement it, (or I can explicitly mention that the values are not related to the game).
I am sorry this is a rather big PR but a lot of refactoring had been necessary to implement that. (And I took the opportunity to make the code cleaner).
This PR implement a way to initialise the game from the application so that user do not have to manually run the
plantbreedgame_setup.Rmd
file.@timflutre, I do not expect a complete review as it is quite big, and nothing seems to broke (thanks to the tests). However, I made one small change that I would like you to be aware of:
Before in the "theory menu" some boundaries of the inputs were specified using the game constants (
mu.trait1
,sigma.p2.trait1
). Now since those values may not exist if the game is not initialised, I used fixed values instead (it was much easier to implement, and I use the same as what is inplantbreedgame_setup.Rmd
). That mean now the theory tab and the game's constant are disconnected.Personally I think it is OK like that. I think that if this is just the "theory" there is no reason to have this linked to the actual game values. But if you would like it to be the case I can take some time to implement it, (or I can explicitly mention that the values are not related to the game).