Closed carolinaecalderon closed 4 years ago
Minor fix made in https://github.com/uchicago-cs/chiventure/tree/openworld/samples-npcs. I printed out the calls to random_room_lookup() and found that I was indeed getting random room values. The error is not in the function but in the test file. This was an erroneous bug issue, and it is now apparent that the expectations of the functions are being executed appropriately.
Issue Score: ✔️++
Comments: Great job! Well done with the targeted bug fix.
In the random_room_lookup function in autogenerate, the idx variable is consistently zero. This means that the room generated is always the room stored at the head of the speclist. The idx variable takes a random number modulo the length of speclist. In order to fix this bug, tests have to be written ensuring the variation of idx value and rand().