Monday, November 20, 2017

Christmas Assigner Problem

So I just encountered a very interesting problem, and came up with a likewise very interesting solution. Recently, my family has made the switch from everyone getting gifts for everyone for Christmas to each person getting gifts for a single person assigned to them. I volunteered to make a JavaScript auto-assigner that will randomly assign one person to each of us and then privately email each of us with the person that we have been assigned.

(Finished in only 589 lines of code, not including another 420 lines of test code!)