Fix life sample code.
Merge pull request #282 from kirich1409/fix_samples

Fix life sample code.