// Path: app/src/main/java/hu/supercluster/gameoflife/game/cell/Cell.java
// public interface Cell {
//     public static final int STATE_ALIVE = 1;
//     public static final int STATE_DEAD = 0;
// 
//     void reset(int state);
//     long getId();
//     int getY();
//     int getX();
//     void setState(int state);
//     int getState();
//     boolean isAlive();
//     boolean isDead();
//     void onNeighborStateChange(int newState);
//     void setOverseer(Overseer overseer);
// }
// 
// Path: app/src/main/java/hu/supercluster/gameoflife/game/cell/CellFactory.java
// public interface CellFactory<T extends Cell> extends Serializable {
//     T create(int x, int y);
//     int[] flatten(T cell);
//     T inflate(int[] flattened);
// }


import hu.supercluster.gameoflife.game.cell.Cell;
import hu.supercluster.gameoflife.game.cell.CellFactory;
package hu.supercluster.gameoflife.game.grid;


public class EndlessGridHandler<T extends Cell> implements GridHandler<T> {
    private final int x;
    private final int y;
// Path: app/src/main/java/hu/supercluster/gameoflife/game/cell/Cell.java
// public interface Cell {
//     public static final int STATE_ALIVE = 1;
//     public static final int STATE_DEAD = 0;
// 
//     void reset(int state);
//     long getId();
//     int getY();
//     int getX();
//     void setState(int state);
//     int getState();
//     boolean isAlive();
//     boolean isDead();
//     void onNeighborStateChange(int newState);
//     void setOverseer(Overseer overseer);
// }
// 
// Path: app/src/main/java/hu/supercluster/gameoflife/game/cell/CellFactory.java
// public interface CellFactory<T extends Cell> extends Serializable {
//     T create(int x, int y);
//     int[] flatten(T cell);
//     T inflate(int[] flattened);
// }


// Path: app/src/main/java/hu/supercluster/gameoflife/game/grid/EndlessGridHandler.java
import hu.supercluster.gameoflife.game.cell.Cell;
import hu.supercluster.gameoflife.game.cell.CellFactory;

package hu.supercluster.gameoflife.game.grid;


public class EndlessGridHandler<T extends Cell> implements GridHandler<T> {
    private final int x;
    private final int y;
    private final CellFactory<T> cellFactory;