Ejemplo n.º 1
0
 public static Ruling.RuleSet GetStdRuleSet()
 {
     var rules = new Ruling.RuleSet();
     var ship = new bool[4, 4, 1];
     ship[0, 0, 0] =
         ship[0, 1, 0] =
         ship[0, 2, 0] = true;
     rules.ShipTypes = new Ruling.ShipType[] {
             new Ruling.ShipType(ship, 2, "Destroyer", 4)
         };
     rules.RepeatWhenHit = false;
     rules.ShootsMultiplicator = 1;
     rules.Size = new Ruling.RuleSet.FieldSize(10, 10, 1);
     rules.MaxShips = rules.ShipTypes.Sum(st => st.Number);
     return rules;
 }
Ejemplo n.º 2
0
 public virtual bool SetRuleSet(Ruling.RuleSet rules)
 {
     if (rules.IsValid) {
         RuleSet = rules;
         EnemyPlayground = new Playground(RuleSet.Size, Playground.FieldState.Unknown);
         return true;
     }
     return false;
 }
Ejemplo n.º 3
0
 public GameConfigMessageRequest(Ruling.RuleSet rules)
 {
     Rules = rules;
 }