summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/random-weight.h
Commit message (Collapse)AuthorAgeFilesLines
* Make Doxygen @returns "@return" for consistancy.reaverb2014-06-051-2/+2
|
* Correct some doxygen blocks.Neil Moore2014-05-291-2/+2
| | | | | Some of them were missing the /** (or /*!) that makes doxygen consider the comment in the first place.
* Document some functions and remove some des whitespacegammafunk2014-03-221-4/+13
|
* Correct return type of random_choose_weighted(FixedVector).Neil Moore2013-05-271-1/+1
| | | | It returns an index, not a value.
* Use std namespace.Raphael Langella2012-08-261-1/+1
| | | | | | | | | | | | | I had to rename distance() (in coord.h) to distance2() because it conflicts with the STL function to compare 2 iterators. Not a bad change given how it returns the square of the distance anyway. I also had to rename the message global variable (in message.cc) to buffer. I tried to fix and improve the coding style has much as I could, but I probably missed a few given how huge and tedious it is. I also didn't touch crawl-gdb.py, and the stuff in prebuilt, rltiles/tool and util/levcomp.*, because I have no clue about those.
* Drop a bunch of parentheses from return statements.Adam Borowski2012-08-081-1/+1
| | | | | This is incomplete, partially because of me getting bored, partially because of doubts about the point of leaving simple addition/etc in parentheses.
* Drop parentheses around scalar values in "return".Adam Borowski2012-07-051-2/+2
|
* New skill training system.Raphael Langella2011-07-041-0/+26
| | | | | | | Exercised are stored in a queue and skills are trained immediately when XP is gained. There's a manual mode in which only the selected skills are trained. No XP pool. No victory dancing.
* ... and check if it works.Adam Borowski2010-09-301-1/+0
|
* Was being passed choices via value, not referenceMatthew Cline2009-11-151-1/+1
| | | | | | Since the vector random_choose_weighted() used was copied, the pointer it returned became invalkid as soon as the function returned an the copied vector went out of scope.
* Document random_choose_weighted.Robert Vollmert2009-11-141-0/+6
|
* Implement weighted choice from array.Robert Vollmert2009-11-141-0/+22