Please see the full article at Coding4Fun for details.