mm6 game mechnism implementation in Java