PHP Puzzles:
Random Loot

By Sherri Wheeler

In our last issue, we looked at multiple solutions for the Fibonacci math problem. We saw a common recursion gotcha when one of our solutions caused PHP to timeout on modest inputs. We then took a more fun direction and presented a problem from game development: randomizing the quality of loot generation. Let’s look at loot quality and then pose another game related puzzle.

This article was originally published in the July 2020 issue of php[architect] magazine. To read the complete article please subscribe or purchase the complete issue.

Leave a comment

Use the form below to leave a comment: