game of life with scala and java