simple java implementation of game of life