Example #1
0
        public static Guy CreateGuy(GuyType guyType)
        {
            switch (guyType)
            {
            default:
            case GuyType.AVERAGE:
                return(new Guy
                {
                    Strength = 1,
                    Health = 1,
                    Speed = 1,
                    Type = guyType
                });

            case GuyType.BEEFY:
                return(new Guy
                {
                    Strength = 2,
                    Health = 1,
                    Speed = 1,
                    Type = guyType
                });

            case GuyType.ARMORED:
                return(new Guy
                {
                    Strength = 1,
                    Health = 2,
                    Speed = 1,
                    Type = guyType
                });

            case GuyType.RUNNER:
                return(new Guy
                {
                    Strength = 1,
                    Health = 1,
                    Speed = 2,
                    Type = guyType
                });
            }
        }
Example #2
0
 public static Move Move(Fort srcFort, Fort destFort, int numGuys, GuyType type)
 {
     return(new Move {
         SourceFortID = srcFort.ID, DestinationFortID = destFort.ID, NumGuys = numGuys, GuyType = type
     });
 }
Example #3
0
 public static List <Guy> FilterGuys(List <Guy> guys, GuyType type)
 {
     return(guys.Where(g => g.Type == type).ToList());
 }