protected override Game Replace(int value) { var game = new ImmutableGame(this); game.field.valuesByPoint[GetLocation(value)] = 0; game.field.valuesByPoint[GetLocation(0)] = value; game.field.pointsByValue[0] = GetLocation(value); game.field.pointsByValue[value] = GetLocation(0); return(game); }
private ImmutableGame(ImmutableGame game) { size = game.size; field = new Field(game.field); }