package com.ljs.ifootballmanager.ai.formation.validate;

import com.ljs.ifootballmanager.ai.Role;

/** @author lstephen */
public final class FormationValidatorFactory {

  private FormationValidatorFactory() {}

  public static FormationValidator ssl() {
    return CountingFormationValidator.builder()
        .exactly(1, Role.GK)
        .range(3, 5, Role.DF)
        .range(2, 6, Role.DM, Role.MF, Role.AM)
        .max(3, Role.DM)
        .max(3, Role.AM)
        .range(1, 4, Role.FW)
        .build();
  }

  public static FormationValidator efl() {
    return CountingFormationValidator.builder()
        .exactly(1, Role.GK)
        .range(3, 5, Role.DF)
        .range(2, 6, Role.DM, Role.MF, Role.AM)
        .max(3, Role.DM)
        .max(3, Role.AM)
        .range(1, 4, Role.FW)
        .build();
  }

  public static FormationValidator esl() {
    return CountingFormationValidator.builder()
        .exactly(1, Role.GK)
        .range(3, 5, Role.DF)
        .range(2, 6, Role.DM, Role.MF, Role.AM)
        .max(3, Role.DM)
        .max(6, Role.MF)
        .max(3, Role.AM)
        .range(1, 4, Role.FW)
        .build();
  }
}

@@ -363,33 +363,33 @@
 %0A        .range(
-2
+1
 , 6, Role.DM, Ro
@@ -461,33 +461,33 @@
 %0A        .range(
-1
+0
 , 4, Role.FW)%0A  

Update SSL formation rules