-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduced dynamic budget at low player count (#28300)
* Reduced dynamic budget at low player count * Tests * One linty boy * I was, uh, making sure the test worked. That definitely wasn't a typo. <.<
- Loading branch information
1 parent
7721d03
commit 9d227fe
Showing
3 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
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,15 @@ | ||
/datum/game_test/dynamic_budget/Run() | ||
var/datum/game_mode/dynamic/dynamic = new() | ||
|
||
// If calculate_budgets updates, and these need to change to match, the pattern is to put an assert at the beginning and end of each distinct range of players (with 100 here standing in for a non-existent upper limit). | ||
TEST_ASSERT_EQUAL(dynamic.calculate_budget(0), 7, "Flat budget incorrect.") | ||
TEST_ASSERT_EQUAL(dynamic.calculate_budget(4), 7, "Flat budget incorrect.") | ||
|
||
TEST_ASSERT_EQUAL(dynamic.calculate_budget(5), 7.5, "Lowpop budget incorrect.") | ||
TEST_ASSERT_EQUAL(dynamic.calculate_budget(20), 15, "Lowpop budget incorrect.") | ||
|
||
TEST_ASSERT_EQUAL(dynamic.calculate_budget(21), 16.5, "Midpop budget incorrect.") | ||
TEST_ASSERT_EQUAL(dynamic.calculate_budget(30), 30, "Midpop budget incorrect.") | ||
|
||
TEST_ASSERT_EQUAL(dynamic.calculate_budget(31), 31, "Highpop budget incorrect.") | ||
TEST_ASSERT_EQUAL(dynamic.calculate_budget(100), 100, "Highpop budget incorrect.") |