
You see, every year, on December 31, my friends and I play gifts. This is our tradition ...
It is not always known in advance who will come to the New Year's party, how many guests there will be and who they will be. In the circle of my friends, this situation was repeated from year to year.
There may not be enough gifts for everyone, so that no one was hurt, once we decided that everyone would seize one “public” gift. And on the spot we decide who gives what and who.
There were always those who brought a mirror, lipstick, chess as a souvenir. That is, gifts, with a pre-limited set of possible recipients. The couples who came to the holiday did not want to give this gift to each other, because they knew in advance what they had prepared.
')
Every time I sat down and wrote on my knee a script for selecting random pairs of donors and recipients. And every time he, the script, was lost the next year. But at the same time there was a new, more perfect. It became more difficult, there were wallpapers, snowflakes and other beauty.
Then one day they reached out to perpetuate the accumulated experience in the field of the "New Year's rally" in the form of an html page, which I want to share with you:
github.com/simbajoe/newyear .
The page itself is almost nothing unusual, html + javascript. There is an English version. It was created a couple of evenings, so do not scold too much. Randomized depth search is used to find pairs. There is a problem with the search time with a large number of restrictions. If someone has good hands, I will be happy to commit.
To get the page up, simply download the repository and run index.html.
Very little time is left before the New Year, the Catholic Christmas is coming, the Orthodox is warming up, and the old New Year is hammering the phone. I hope that someone this New Year's website is useful.
Happy New Year!