Ejemplo n.º 1
0
        internal static LandSize ParseSize(string size)
        {
            var commantType = Parser.GetTypeOfCommand(size);

            if (commantType != Enums.CommandType.LandSizing)
            {
                throw new CommandException("Wrong command for the Land size!");
            }

            LandSize landSize = new LandSize()
            {
                Width  = byte.Parse(size.Split(Separator)[0]),
                Height = byte.Parse(size.Split(Separator)[1])
            };

            return(landSize);
        }
Ejemplo n.º 2
0
 private void SetSize(string size)
 {
     Size = Parser.ParseSize(size);
 }