-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add robots.txt. Refactoring core app.
- Loading branch information
1 parent
db23b42
commit a12ba17
Showing
12 changed files
with
58 additions
and
44 deletions.
There are no files selected for viewing
File renamed without changes.
33 changes: 1 addition & 32 deletions
33
hmom3/apps/core/balance/duration_cost.py → hmom3/apps/core/balance/costs_buildings.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
""" | ||
Define function of increasing amount depend on building level: | ||
- Building time | ||
- Research time | ||
""" | ||
import math | ||
|
||
BUILD_TIME_COEF = 0.08 | ||
SEARCH_TIME_COEF = 0.2 | ||
BUILD_EXPONENT_COEF = 3 | ||
SEARCH_EXPONENT_COEF = 2 | ||
ZERO_EXPONENT = 1 | ||
|
||
|
||
def get_building_time(level, tech=1, time=None): | ||
"""Building time depend on level.""" | ||
result = ( | ||
((1 / math.e ** (level - ZERO_EXPONENT) + 1 * BUILD_TIME_COEF) | ||
* level ** BUILD_EXPONENT_COEF) * time / tech | ||
) | ||
return result | ||
|
||
|
||
def get_research_time(level, tech=1, time=None): | ||
"""Research time depend on level.""" | ||
result = ( | ||
((1 / math.e ** (level - ZERO_EXPONENT) + SEARCH_TIME_COEF) | ||
* level ** SEARCH_EXPONENT_COEF | ||
) * time / tech | ||
) | ||
return result | ||
|
||
|
||
if __name__ == '__main__': | ||
for i in range(1, 101): | ||
print(int(get_research_time(i, 1, 1))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
User-agent: * | ||
Allow: / | ||
Disallow: /mana/ |