Beispiel #1
0
        /// <summary>
        /// Формирует метаданные цвета формы жизни
        /// </summary>
        /// <returns></returns>
        public override StateMetadata GetMetadata()
        {
            StateMetadata stateMetadata = base.GetMetadata();

            stateMetadata.Add("Color", $"{R} {G} {B}");
            stateMetadata.Add("ColorType", _colorType.ToString());
            return(stateMetadata);
        }
Beispiel #2
0
        public override StateMetadata GetMetadata()
        {
            string        strGenom      = "";
            StateMetadata stateMetadata = base.GetMetadata();

            if (action == Actions.Move || action == Actions.CheckEnergy ||
                action == Actions.Eat || action == Actions.DoDescendant)
            {
                stateMetadata.Add("Action", action.ToString() + "|" + direction.ToString());
            }
            else
            {
                stateMetadata.Add("Action", action.ToString());
            }
            foreach (byte b in genom)
            {
                strGenom += b.ToString() + "|";
            }
            stateMetadata.Add("Genom", "" + strGenom);
            stateMetadata.Add("YTK", YTK.ToString());
            return(stateMetadata);
        }