コード例 #1
0
        public bool ShouldAutoPass(Grove.Step step, bool isActiveTurn, bool anyPlayerPlayedSomething)
        {
            if (anyPlayerPlayedSomething)
            return false;

              var config = GetAutoPass(step);

              if (config.Pass == Pass.Always)
            return true;

              return isActiveTurn
               ? config.Pass == Pass.Active
               : config.Pass == Pass.Passive;
        }
コード例 #2
0
 private AutoPass GetAutoPass(Grove.Step step)
 {
     return _autoPassConfiguration.Single(x => x.Step == step);
 }
コード例 #3
0
 public void ToggleAutoPass(Grove.Step step)
 {
     var config = GetAutoPass(step);
       config.Toggle();
 }
コード例 #4
0
 public Pass GetAutoPassConfiguration(Grove.Step step)
 {
     return GetAutoPass(step).Pass;
 }