PHP Puzzles:
Rock Paper Scissors
By Sherri Wheeler
This month, we have a try at writing a function to play the hand gesture game Rock Paper Scissors. It serves as an example of a single function that takes in a distinct set of inputs to return an output based on pre-defined rules.
This article was originally published in the April 2021 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: