Ruby on rails implementation of a simple resistance card distributor