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

Move income levels to credits structure to dedicated place #55

Open
4 tasks
FifthSurprise opened this issue Jun 11, 2016 · 1 comment
Open
4 tasks

Move income levels to credits structure to dedicated place #55

FifthSurprise opened this issue Jun 11, 2016 · 1 comment
Assignees

Comments

@FifthSurprise
Copy link
Contributor

FifthSurprise commented Jun 11, 2016

Currently the Income Levels are stored on database but the conversion from that to Credits is just put in a hash in GamesController#human_control. Also it exists in api controller.

This is bad for two reasons:
1.) Changes to how much income level affects credits received have to made in a controller method
2.) As part of #49, we can now potentially allow for custom team/countries. They would also need to have their own IncomeLevel to Credit rates provided/stored somewhere. No longer a thing because custom team/countries is waaaaaay too complicated.

I am thinking that the basic Income Levels for the standard countries can just be stored in a JSON or YML file or perhaps in Income.rb. Then on a per game level, we could reset the income levels for default countries.

Please note that right now the Team and Team Role models are just unique categorizations. So a join table may need to be created for a game in which you store the income levels.

  • Move Income Levels to Credits hash to better location
  • Ensure existing Income => Credit conversion does not break
  • Ensure app doesn't break if you're income level is higher that the current max. This might already be taken care of but we should award the max credit amount if you're income level is stupid high.
  • Explore the possibility of adding custom income levels for a team for a game. Please check in with me first with the schema idea before undertaking this.
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

3 participants