diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-11-13 23:34:11 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-11-14 00:45:06 +0100 |
commit | 5c15e6abda97c19829d5b2b348b422f3857b42f7 (patch) | |
tree | b269e5a5a439ee02d9d5e84bc94adc78c9769d75 /crawl-ref/source/random.h | |
parent | 93534c22120fb7693535a4d341d94158469674ad (diff) | |
download | crawl-ref-5c15e6abda97c19829d5b2b348b422f3857b42f7.tar.gz crawl-ref-5c15e6abda97c19829d5b2b348b422f3857b42f7.zip |
Implement weighted choice from array.
Diffstat (limited to 'crawl-ref/source/random.h')
-rw-r--r-- | crawl-ref/source/random.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crawl-ref/source/random.h b/crawl-ref/source/random.h index 1b71986b4b..2ab25a5241 100644 --- a/crawl-ref/source/random.h +++ b/crawl-ref/source/random.h @@ -18,6 +18,7 @@ int random_range(int low, int high, int nrolls); const char* random_choose_string(const char* first, ...); int random_choose(int first, ...); int random_choose_weighted(int weight, int first, ...); + int random2avg(int max, int rolls); int bestroll(int max, int rolls); int random2limit(int max, int limit); |