On 25/01/2016 17:53, Mahesh Dabhade wrote:
Hi...I have problem in game of life... But I have 4 states rather than just two states like live and dead... These are 0 : bare earth 1: grass 2: prey 3: predator And rules are 1 )if 2 surrounded by less than 2 of 1 then 2 becomes 1.....starvation 2)if 0 surrounded by more than 0 of 1 then 0 becomes 1 3)if 1 surrounded by more than 1 of 2 then 1 will be 0 4)if 3 surrounded by less than 2 of 1 then 3 becomes 0 Now I am not even able to count the neighbors.... Can u plzz help me out in counting neighbours... N even better can u plzz send the program code....
Please show us the code that you have so far as we do not write code for you.
It will be great help.... Thanks
-- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor