Here’s the code:
public CellState(Context context, GameState state) {
super(context);
setLayoutParams(new GridView.LayoutParams(70, 70));
setScaleType(ImageView.ScaleType.CENTER_CROP);
setPadding(8, 8, 8, 8);
setClickable(true);
mGameState = state;
//TODO: call clearState
}
So I have to call clearState, which has already been written. This is from a java/android intro tutorial and I’ve never programmed before so I’ve been slogging through. Any help on what to do to call clearState would be appreciated.
clearState code:
public void clearState() {
mState = EMPTY;
}
Write this in place of your comment:
Functions are called by first writing the name of the function, then parenthesis, and ; in the end. If the function takes any parameters, then those go inside the parenthesis, multiple params separated with commas.