Hi i have to write java code for the "Game of Life" game. The number of cells must be infinite.
Is the approach correct? I mean Design wise are they tightly coupled?
Class Universe
{
Cell cells[];
}
Class cell
{
boolean live;
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want an “infinite” amount of cells, then use some type of expandable list (ArrayList, LinkedList, etc).
However, you’ll only be able to allocate as many cells as your computer memory will allow.
Don’t really know what you mean by tightly/loosely coupled… explain?