public MarcidiaComponent(Mud mud)
        {
            if (mud == null)
                throw new ArgumentNullException("services", "services is null.");

            this.Mud = mud;
        }
Example #2
0
    public void SetCube(Vector3 pos, CubeType type)
    {
        int x = (int)pos.x;
        int y = (int)pos.y;
        int z = (int)pos.z;

        if (OutOfBound(x, y, z))
        {
            return;
        }

        if (type == CubeType.Stone)
        {
            cubes[x, y, z] = new Stone(pos, world);
        }
        else if (type == CubeType.Sand)
        {
            cubes[x, y, z] = new Sand(pos, world);
        }
        else if (type == CubeType.Ice)
        {
            cubes[x, y, z] = new Ice(pos, world);
        }
        else if (type == CubeType.Mud)
        {
            cubes[x, y, z] = new Mud(pos, world);
        }
        else if (type == CubeType.Cloud)
        {
            cubes[x, y, z] = new Cloud(pos, world);
        }
    }
Example #3
0
        public void Perform(PossibleMatch Match, Actor Actor)
        {
            var target = Match.Arguments["TARGET"] as Thing;

            if (target == null)
            {
                if (Actor.ConnectedClient != null)
                {
                    Actor.ConnectedClient.Send("Drop what again?\r\n");
                }
            }
            else
            {
                if (!Object.ReferenceEquals(target.Location, Actor))
                {
                    Actor.ConnectedClient.Send("You aren't holding that.\r\n");
                    return;
                }

                var dropRules = target as IDropRules;
                if (dropRules != null && !dropRules.CanDrop(Actor))
                {
                    Actor.ConnectedClient.Send("You can't drop that.\r\n");
                    return;
                }

                Mud.SendEventMessage(Actor, EventMessageScope.Single, "You drop " + target.Short + "\r\n");
                Mud.SendEventMessage(Actor, EventMessageScope.External, Actor.Short + " drops " + target.Short + "\r\n");
                Thing.Move(target, Actor.Location);
            }
        }
Example #4
0
    public Map(GameObject hexPrism, GameObject playerObj, int width = 10, int height = 10)
    {
        _hexPrism = hexPrism;
        _width    = width;
        _height   = height;

        _hexes = new HexElement[width, height];

        for (int i = 0; i < width; ++i)
        {
            for (int j = 0; j < height; ++j)
            {
                int type = Random.Range(0, 99) % 3;
                switch (type)
                {
                case 1:
                    _hexes[i, j] = new Mud();
                    break;

                case 2:
                    _hexes[i, j] = new Grass();
                    break;

                default:
                    _hexes[i, j] = new Block();
                    break;
                }
            }
        }

        _player    = new Player[1];
        _player[0] = new Player(playerObj, 0, 0);
    }
        public void Perform(PossibleMatch Match, Actor Actor)
        {
            var speechBuilder = new StringBuilder();

            speechBuilder.Append(Actor.Short);
            if (EmoteType == EmoteTypes.Speech)
            {
                speechBuilder.Append(": \"");
            }
            else
            {
                speechBuilder.Append(" ");
            }

            for (var node = Match.Arguments["SPEECH"] as LinkedListNode <String>; node != null; node = node.Next)
            {
                speechBuilder.Append(node.Value);
                speechBuilder.Append(" ");
            }

            speechBuilder.Remove(speechBuilder.Length - 1, 1);
            if (EmoteType == EmoteTypes.Speech)
            {
                speechBuilder.Append("\"\r\n");
            }
            else
            {
                speechBuilder.Append("\r\n");
            }

            Mud.SendEventMessage(Actor, EventMessageScope.Local, speechBuilder.ToString());
        }
Example #6
0
        public void Perform(PossibleMatch Match, Actor Actor)
        {
            var direction = Match.Arguments["DIRECTION"] as Direction?;
            var location  = Actor.Location as Room;
            var link      = location.Links.FirstOrDefault(l => l.Direction == direction.Value);

            if (link == null)
            {
                Mud.SendEventMessage(Actor, EventMessageScope.Single, "You can't go that way.\r\n");
            }
            else
            {
                if (link.Door != null)
                {
                    if (!link.Door.Open)
                    {
                        Mud.SendEventMessage(Actor, EventMessageScope.Single, "The door is closed.");
                        return;
                    }
                }

                Mud.SendEventMessage(Actor, EventMessageScope.Single, "You went " + direction.Value.ToString().ToLower() + ".\r\n");
                Mud.SendEventMessage(Actor, EventMessageScope.External, Actor.Short + " went " + direction.Value.ToString().ToLower() + "\r\n");
                var destination = Mud.GetObject(link.Destination) as Room;
                if (destination == null)
                {
                    throw new InvalidOperationException("Link does not lead to room.");
                }
                Thing.Move(Actor, destination);
                Mud.EnqueuClientCommand(Actor.ConnectedClient, "look");
            }
        }
Example #7
0
        public void Perform(PossibleMatch Match, Actor Actor)
        {
            var target = Match.Arguments["TARGET"] as Thing;

            if (target == null)
            {
                if (Actor.ConnectedClient != null)
                {
                    Actor.ConnectedClient.Send("Take what again?\r\n");
                }
            }
            else
            {
                var takeRules = target as ITakeRules;
                if (takeRules != null && !takeRules.CanTake(Actor))
                {
                    Actor.ConnectedClient.Send("You can't take that.\r\n");
                    return;
                }

                Mud.SendEventMessage(Actor, EventMessageScope.Single, "You take " + target.Short + "\r\n");
                Mud.SendEventMessage(Actor, EventMessageScope.External, Actor.Short + " takes " + target.Short + "\r\n");
                Thing.Move(target, Actor);
            }
        }
Example #8
0
        public void Perform(PossibleMatch Match, Actor Actor)
        {
            if (Actor.ConnectedClient == null)
            {
                return;
            }

            var builder = new StringBuilder();

            if (Actor.Inventory.Count == 0)
            {
                builder.Append("You have nothing.");
            }
            else
            {
                builder.Append("You are carrying..\r\n");
                foreach (var item in Actor.Inventory)
                {
                    builder.Append("  ");
                    builder.Append(item.Short);
                    builder.Append("\r\n");
                }
            }

            Mud.SendEventMessage(Actor, EventMessageScope.Single, builder.ToString());
        }
Example #9
0
        public static bool CanBePlanted(Farm farm, Vector3 cellVector, out bool returnValue)
        {
            if (cellVector == -Vector3.One)
            {
                returnValue = false;
                return(true);
            }
            Map     map  = GnomanEmpire.Instance.Map;
            MapCell cell = map.GetCell(cellVector);

            if ((bool)UndergroundField.GetValue(farm))
            {
                Mud mud = cell.EmbeddedFloor as Mud;
                if (mud != null && cell.ProposedJob == null && mud.PlantedSeed == null)
                {
                    returnValue = true;
                    return(true);
                }
            }
            else
            {
                TilledSoil tilledSoil = cell.EmbeddedFloor as TilledSoil;
                if (tilledSoil != null && cell.ProposedJob == null && tilledSoil.PlantedSeed == null && !(cell.EmbeddedWall is Crop))
                {
                    returnValue = true;
                    return(true);
                }
            }
            returnValue = false;
            return(true);
        }
Example #10
0
        public void Perform(PossibleMatch Match, Actor Actor)
        {
            var location = Actor.Location as Room;

            if (location == null)
            {
                throw new InvalidOperationException("Error: Actor not in room.");
            }

            if (Actor.ConnectedClient != null)
            {
                var builder = new StringBuilder();

                builder.Append(location.Short);
                builder.Append("\r\n");
                builder.Append(location.Long.Expand(Actor, location));
                builder.Append("\r\n");

                //Display objects in room
                if (location.Contents.Count > 0)
                {
                    builder.Append("Also here: " + String.Join(",", location.Contents.Select(t => t.Short)));
                }
                else
                {
                    builder.Append("There is nothing here.");
                }
                builder.Append("\r\n");

                //Display exits from room
                if (location.Links.Count > 0)
                {
                    builder.Append("Obvious exits: ");

                    for (int i = 0; i < location.Links.Count; ++i)
                    {
                        var l = location.Links[i];

                        builder.Append(l.Direction.ToString().ToLower());

                        if (l.Door != null)
                        {
                            builder.Append(" [through ");
                            builder.Append(l.Door.Short);
                            builder.Append("]");
                        }

                        if (i != location.Links.Count - 1)
                        {
                            builder.Append(", ");
                        }
                    }

                    builder.AppendLine("\r\n");
                }

                Mud.SendEventMessage(Actor, EventMessageScope.Single, builder.ToString());
            }
        }
Example #11
0
        /// <inheritdoc />
        public override void RandomUpdate(World world, Vector3i position, uint data)
        {
            LiquidInstance?liquid = world.GetLiquid(position);

            if (liquid?.Liquid == Liquid.Water && liquid.Level == LiquidLevel.Eight)
            {
                world.SetBlock(Mud.AsInstance(), position);
            }
        }
Example #12
0
        public CommandManager(Mud mud)
            : base(mud)
        {
            commandInfoBuilder = new CommandInfoBuilder();
            actorCommandMap = new Dictionary<Type, List<CommandInfo>>();

            Mud.Services.AddService<ICommandRegistrar>(this);
            Mud.Services.AddService<ICommandContextFactory>(this);
        }
        public void Perform(PossibleMatch Match, Actor Actor)
        {
            var target      = Match.Arguments["TARGET"] as Thing;
            var destination = Match.Arguments["DESTINATION"].ToString();
            var room        = Mud.GetObject(destination);

            if (room != null)
            {
                Thing.Move(target, room);
            }
        }
Example #14
0
 public ActionResult CreateMUD(Mud model)
 {
     try
     {
         Mud mud = new Mud {
             MudName = model.MudName, MudDescription = model.MudDescription
         };
         repo.Muds.Add(mud);
         repo.SaveChanges();
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View(model));
     }
 }
        public void Perform(PossibleMatch Match, Actor Actor)
        {
            if (Actor.ConnectedClient != null)
            {
                var builder = new StringBuilder();
                foreach (var command in Mud.ParserCommandHandler.Parser.Commands)
                {
                    builder.Append(command.Matcher.Emit());
                    builder.Append(" -- ");
                    builder.Append(command.HelpText);
                    builder.Append("\r\n");
                }

                Mud.SendEventMessage(Actor, EventMessageScope.Single, builder.ToString());
            }
        }
        public void Perform(PossibleMatch Match, Actor Actor)
        {
            var target = Match.Arguments["TARGET"] as IDescribed;

            if (Actor.ConnectedClient != null)
            {
                if (target == null)
                {
                    Mud.SendEventMessage(Actor, EventMessageScope.Single, "That object is indescribeable.\r\n");
                }
                else
                {
                    Mud.SendEventMessage(Actor, EventMessageScope.Single, target.Long.Expand(Actor, target as MudObject) + "\r\n");
                }
            }
        }
Example #17
0
        /// <inheritdoc />
        public override void RandomUpdate(World world, Vector3i position, uint data)
        {
            LiquidInstance?liquid = world.GetLiquid(position);

            if (liquid?.Liquid == Liquid.Water && liquid.Level == LiquidLevel.Eight)
            {
                world.SetBlock(Mud.AsInstance(), position);
            }

            for (int yOffset = -1; yOffset <= 1; yOffset++)
            {
                foreach (Orientation orientation in Orientations.All)
                {
                    Vector3i otherPosition = orientation.Offset(position) + Vector3i.UnitY * yOffset;

                    if (world.GetBlock(otherPosition)?.Block is IGrassSpreadable grassSpreadable)
                    {
                        grassSpreadable.SpreadGrass(world, otherPosition, this);
                    }
                }
            }
        }
Example #18
0
    public void GenerateCubes()
    {
        for (int x = 0; x < worldWidth; x++)
        {
            for (int y = 0; y < worldHeight; y++)
            {
                for (int z = 0; z < worldWidth; z++)
                {
                    if (cubeDatas[x, y, z] != null)
                    {
                        if (cubeDatas[x, y, z].cubeType == CubeType.Stone)
                        {
                            cubes[x, y, z] = new Stone(new Vector3(x, y, z), world);
                        }
                        else if (cubeDatas[x, y, z].cubeType == CubeType.Sand)
                        {
                            cubes[x, y, z] = new Sand(new Vector3(x, y, z), world);
                        }
                        else if (cubeDatas[x, y, z].cubeType == CubeType.Ice)
                        {
                            cubes[x, y, z] = new Ice(new Vector3(x, y, z), world);
                        }
                        else if (cubeDatas[x, y, z].cubeType == CubeType.Mud)
                        {
                            cubes[x, y, z] = new Mud(new Vector3(x, y, z), world);
                        }
                        else if (cubeDatas[x, y, z].cubeType == CubeType.Cloud)
                        {
                            cubes[x, y, z] = new Cloud(new Vector3(x, y, z), world);
                        }

                        cubeCount++;
                    }
                }
            }
        }
    }
Example #19
0
        private Tile generateTiles(char[,] lBoard)
        {
            Tile firstTile = null;

            for (int height = 0; height < LevelData.Level_height; height++)
            {
                bool firstOfRow = true;

                for (int width = 0; width < LevelData.Level_width; width++)
                {
                    char tile = lBoard[height, width];
                    Tile newTile;

                    switch (tile)
                    {
                    case 'R':
                        Player player = new Player();
                        newTile = new Floor(_Model, player);
                        player.CurrentLocation = (Floor)newTile;
                        _Controller.SetPlayer(player);
                        break;

                    case 'M':
                        Mud mud = new Mud();
                        newTile             = new Floor(_Model, mud);
                        mud.CurrentLocation = (Floor)newTile;
                        break;

                    case 'B':
                        Boulder boulder = new Boulder();
                        newTile = new Floor(_Model, boulder);
                        boulder.CurrentLocation = (Floor)newTile;
                        break;

                    case 'D':
                        Diamond diamond = new Diamond();
                        newTile = new Floor(_Model, diamond);
                        diamond.CurrentLocation = (Floor)newTile;
                        _Model.AddDiamond();
                        break;

                    case 'W':
                        Wall wall = new Wall();
                        newTile = new Floor(_Model, wall);
                        wall.CurrentLocation = (Floor)newTile;
                        break;

                    case 'S':
                        newTile = new SteelWall();
                        break;

                    case 'F':
                        FireFly fireFly = new FireFly();
                        newTile = new Floor(_Model, fireFly);
                        fireFly.CurrentLocation = (Floor)newTile;
                        _Model.AddFireFly(fireFly);
                        break;

                    case 'E':
                        Exit e = new Exit(_Model);
                        _Model.AddExit(e);
                        newTile = e;
                        break;

                    case 'H':
                        HardenedMud hardenedMud = new HardenedMud();
                        newTile = new Floor(_Model, hardenedMud);
                        hardenedMud.CurrentLocation = (Floor)newTile;
                        break;

                    case 'T':
                        TNT tnt = new TNT();
                        newTile             = new Floor(_Model, tnt);
                        tnt.CurrentLocation = (Floor)newTile;
                        break;

                    default:
                        newTile = new Floor(_Model);
                        break;
                    }

                    if (firstTile != null)
                    {
                        if (firstOfRow)
                        {
                            firstTile.SetTile(newTile, Direction.DOWN);
                            firstOfRow = false;
                        }
                        else
                        {
                            firstTile.SetTile(newTile, Direction.RIGHT);
                        }
                    }
                    else
                    {
                        firstTile  = newTile;
                        firstOfRow = false;
                    }
                }
            }

            return(firstTile);
        }
        //opening the dialogs for choosing an existing level
        private void loadLevel()
        {
            OpenFileDialog BrowseFile = new OpenFileDialog();

            BrowseFile.Filter      = "XML Files (*.xml)|*.xml";
            BrowseFile.FilterIndex = 0;
            BrowseFile.DefaultExt  = "xml";
            if (BrowseFile.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                ObstacleList.Clear();
                doc = new XmlDocument();
                try
                {
                    doc.Load(BrowseFile.FileName);
                }
                catch (Exception e)
                {
                    MessageBox.Show("Level Could't be read please check your file. Error: " + e, "Information", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                XmlNodeList xmlnode;
                xmlnode = doc.GetElementsByTagName("object");
                for (int i = 0; i < xmlnode.Count; i++)
                {
                    string name  = xmlnode[i].ChildNodes.Item(0).InnerText;
                    int    xaxis = Convert.ToInt32(xmlnode[i].ChildNodes.Item(1).InnerText);
                    int    yaxis = Convert.ToInt32(xmlnode[i].ChildNodes.Item(2).InnerText);
                    string speed = xmlnode[i].ChildNodes.Item(3).InnerText;
                    //adding the objects to the object list
                    switch (name)
                    {
                    case "tree":
                        Tree tree = new Tree(xaxis, yaxis);
                        ObstacleList.Add(tree);
                        Console.WriteLine("Tree added to list.");
                        break;

                    case "sandbag":
                        Sandbag sandbag = new Sandbag(xaxis, yaxis);
                        ObstacleList.Add(sandbag);
                        Console.WriteLine("Tree added to list.");
                        break;

                    case "mine":
                        Mine mine = new Mine(xaxis, yaxis);
                        ObstacleList.Add(mine);
                        Console.WriteLine("Tree added to list.");
                        break;

                    case "mud":
                        Mud mud = new Mud(xaxis, yaxis);
                        ObstacleList.Add(mud);
                        Console.WriteLine("Tree added to list.");
                        break;

                    case "finish":
                        Finish finish = new Finish(xaxis, yaxis);
                        ObstacleList.Add(finish);
                        Console.WriteLine("Tree added to list.");
                        break;

                    case "missilelauncher":
                        ObstacleList.Add(new Missilelauncher(xaxis, yaxis));
                        Console.WriteLine("Missilelauncher added to list.");
                        break;

                    default:
                        break;
                    }
                }
            }
        }
Example #21
0
        public void ParseMap(XmlDocument doc, ref ProgressBarDialog progressBarDialog)
        {
            XmlNodeList xmlnode;

            xmlnode = doc.GetElementsByTagName("level_name");
            GameEngine.levelName = xmlnode[0].InnerText;

            xmlnode = doc.GetElementsByTagName("object");

            progressBarDialog.updateProgressBar(xmlnode.Count, 0);

            for (int i = 0; i < xmlnode.Count; i++)
            {
                string name  = xmlnode[i].ChildNodes.Item(0).InnerText;
                int    xaxis = Convert.ToInt32(xmlnode[i].ChildNodes.Item(1).InnerText);
                int    yaxis = Convert.ToInt32(xmlnode[i].ChildNodes.Item(2).InnerText);
                string speed = xmlnode[i].ChildNodes.Item(3).InnerText;

                switch (name)
                {
                case "missilelauncher":
                    Missilelauncher missilelauncher = new Missilelauncher(xaxis, yaxis);
                    gameEngine.level.parsedList.Add(missilelauncher);
                    Console.WriteLine("Missilelauncher added to list.");
                    break;

                case "tree":
                    Tree tree = new Tree(xaxis, yaxis);
                    gameEngine.level.parsedList.Add(tree);
                    Console.WriteLine("Tree added to list.");
                    break;

                case "sandbag":
                    Sandbag sandbag = new Sandbag(xaxis, yaxis);
                    gameEngine.level.parsedList.Add(sandbag);
                    Console.WriteLine("Sandbag added to list.");
                    break;

                case "mine":
                    Mine mine = new Mine(xaxis, yaxis);
                    gameEngine.level.parsedList.Add(mine);
                    Console.WriteLine("Mine added to list.");
                    break;

                case "mud":
                    Mud mud = new Mud(xaxis, yaxis);
                    gameEngine.level.parsedList.Add(mud);
                    Console.WriteLine("Mud added to list.");
                    break;

                case "finish":
                    Finish finish = new Finish(xaxis, yaxis);
                    gameEngine.level.parsedList.Add(finish);
                    Console.WriteLine("Finish added to list.");
                    break;

                default:
                    break;
                }
                progressBarDialog.updateProgressBar(xmlnode.Count, i + 1);
            }
            progressBarDialog.Close();
            foreach (Obstacle obstacle in gameEngine.level.parsedList)
            {
                switch (obstacle.ToString())
                {
                case "WarGame.Model.Mine":
                    gameEngine.level.obstacleList.Add(new Mine(obstacle as Mine));
                    break;

                case "WarGame.Model.Mud":
                    gameEngine.level.obstacleList.Add(new Mud(obstacle as Mud));
                    break;

                case "WarGame.Model.Missilelauncher":
                    gameEngine.level.obstacleList.Add(new Missilelauncher(obstacle as Missilelauncher));
                    break;

                case "WarGame.Model.Tree":
                    gameEngine.level.obstacleList.Add(new Tree(obstacle as Tree));
                    break;

                case "WarGame.Model.Sandbag":
                    gameEngine.level.obstacleList.Add(new Sandbag(obstacle as Sandbag));
                    break;

                case "WarGame.Model.Finish":
                    gameEngine.level.obstacleList.Add(new Finish(obstacle as Finish));
                    break;
                }
            }
            gameEngine.LevelImported = true;
        }
 public AutoComponentLoader(Mud mud)
     : base(mud)
 {
     this.mud = mud;
 }
 public TelnetConnectionComponent(Mud mud)
     : base(mud)
 {
 }
Example #24
0
        // Threadmill and mug calculations.
        void CalculateThreadmillAndMudInteraction(RaycastHit2D[] freshContacts)
        {
            // Was last movement ground contact?
            if (_lastGroundContacts != null)
            {
                // Yes.

                // Go through contact cubes.
                foreach (RaycastHit2D rh in _lastGroundContacts)
                {
                    // Is Mud cube under already destroyed?
                    if (rh.collider != null)
                    {
                        // No.
                        GameObject go = rh.collider.gameObject;

                        // Is it mud?
                        if (go.layer == _MudLayerIndex)
                        {
                            //Yes.
                            Mud mc = go.GetComponent <Mud>();
                            // Stop sliding of cube.
                            mc.Slide(false);
                        }
                    }
                }
            }

            // Was new movement ground contact?
            if (freshContacts != null)
            {
                // Yes.

                // Threadmill flag.
                bool isThreadmill = false;

                // Go through contact cubes.
                foreach (RaycastHit2D rh in freshContacts)
                {
                    GameObject go = rh.collider.gameObject;

                    // Is it mud?
                    if (go.layer == _MudLayerIndex)
                    {
                        //Yes.
                        // Start sliding of cube.
                        go.GetComponent <Mud>().Slide(true);
                    }

                    // Is it threadmill?
                    if (go.layer == _ThreadmillsLayerIndex)
                    {
                        //Yes.
                        isThreadmill = true;

                        // Is direction button not pressed, or movement is opposite of face direction?
                        if (_PressedKeyDirection == 0 || (_PressedKeyDirection < 0 && _IsPlayerFacingRight == true) || (_PressedKeyDirection > 0 && _IsPlayerFacingRight == false))
                        {
                            // Yes, force the movement on the threadmill.
                            _ForceMovingOnThreadmill = true;
                        }
                    }
                }

                // Was there none fresh threadmill contacts?
                if (isThreadmill == false)
                {
                    // Yes, reset moving on the threadmill.
                    _ForceMovingOnThreadmill = false;
                }
            }
            else
            {
                // No, reset moving on the threadmill.
                _ForceMovingOnThreadmill = false;
            }

            // Fresh ones are now last ground contacts.
            _lastGroundContacts = freshContacts;
        }
Example #25
0
        public static void EnsurePopulated(IApplicationBuilder app)
        {
            ApplicationDbContext context = app.ApplicationServices
                                           .GetRequiredService <ApplicationDbContext>();

            context.Database.Migrate();

            if (!context.Events.Any())
            {
                var mud1 = new Mud()
                {
                    MudName        = "This is Jay's Mud Name.",
                    MudDescription = "This is Jay's Mud Description. Jay loves to make muds. It is his favorite."
                };

                var mud2 = new Mud()
                {
                    MudName        = "This is Jordan's Mud Name.",
                    MudDescription = "This is Jordan's Mud Description. Jordan really made a mess of this mud."
                };

                var event1 = new Event()
                {
                    EventName        = "Philly Special",
                    EventDescription = "You are about to witness the GREATEST play in NFL history",
                    EventText        = "It's 4th and Goal. The Biggest game of your lifetime. The stakes could not be higher. Do you have the gumption to pull this off?",
                    EventTriggered   = false,
                    DirLeft          = null,
                    DirRight         = null,
                    DirFwd           = null,
                    DirBack          = null, // if DirBack remains null => this is the starting event?
                                             //EventTypeId = 00001,
                    Mud = mud1
                };

                var event2 = new Event()
                {
                    EventName        = "Miracle at the Meadowlands",
                    EventDescription = "The Miracle at the Meadowlands was a fumble recovery by cornerback Herman Edwards that he returned for a touchdown at the end of a November 19, 1978",
                    EventText        = "Everyone watching expected quarterback Joe Pisarcik to take one more snap and kneel with the ball, thus running out the clock and preserving a 17–12 Giants upset. Instead, he botched an attempt to hand off the football to fullback Larry Csonka. Edwards picked up the dropped ball and ran 26 yards for the winning score.",
                    EventTriggered   = false,
                    DirLeft          = null,
                    DirRight         = null,
                    DirFwd           = null,
                    DirBack          = event1.EventId,
                    //EventTypeId = 00002,
                    Mud = mud1
                };

                var event3 = new Event()
                {
                    EventName        = "Miracle at the Meadowlands II",
                    EventDescription = "Improbable come-from-behind win by the Philadelphia Eagles over rival team the New York Giants at New Meadowlands Stadium on December 19, 2010",
                    EventText        = "With just over eight minutes to play in the fourth quarter, the Eagles trailed the Giants by 21 points. They went on to score four unanswered touchdowns in the final seven minutes and 28 seconds of play, including a punt returned for a touchdown by DeSean Jackson as time expired. Jackson became the first player in NFL history to win a game by scoring on a punt return as time expired. The win allowed the Eagles to progress to the 2010 NFL playoffs by head-to-head tiebreaker over the Giants, where they lost to eventual Super Bowl champion Green Bay Packers.",
                    EventTriggered   = false,
                    DirLeft          = null,
                    DirRight         = null,
                    DirFwd           = null,
                    DirBack          = event1.EventId,
                    //EventTypeId = 00002,
                    Mud = mud1
                };

                var event4 = new Event()
                {
                    EventName        = "Miracle at the Meadowlands",
                    EventDescription = "The Miracle at the Meadowlands was a fumble recovery by cornerback Herman Edwards that he returned for a touchdown at the end of a November 19, 1978",
                    EventText        = "Everyone watching expected quarterback Joe Pisarcik to take one more snap and kneel with the ball, thus running out the clock and preserving a 17–12 Giants upset. Instead, he botched an attempt to hand off the football to fullback Larry Csonka. Edwards picked up the dropped ball and ran 26 yards for the winning score.",
                    EventTriggered   = false,
                    DirLeft          = null,
                    DirRight         = null,
                    DirFwd           = null,
                    DirBack          = event1.EventId,
                    //EventTypeId = 00002,
                    Mud = mud1
                };

                event1.DirLeft  = event2.EventId;
                event1.DirFwd   = event3.EventId;
                event1.DirRight = event4.EventId;

                var event5 = new Event()
                {
                    EventName        = "Miracle at the Meadowlands II",
                    EventDescription = "Improbable come-from-behind win by the Philadelphia Eagles over rival team the New York Giants at New Meadowlands Stadium on December 19, 2010",
                    EventText        = "With just over eight minutes to play in the fourth quarter, the Eagles trailed the Giants by 21 points. They went on to score four unanswered touchdowns in the final seven minutes and 28 seconds of play, including a punt returned for a touchdown by DeSean Jackson as time expired. Jackson became the first player in NFL history to win a game by scoring on a punt return as time expired. The win allowed the Eagles to progress to the 2010 NFL playoffs by head-to-head tiebreaker over the Giants, where they lost to eventual Super Bowl champion Green Bay Packers.",
                    EventTriggered   = false,
                    DirLeft          = null,
                    DirRight         = null,
                    DirFwd           = null,
                    DirBack          = event2.EventId,
                    //EventTypeId = 00002,
                    Mud = mud1
                };

                var fight1 = new Fight()
                {
                    /*int*/
                    Health = 100,
                    /*int*/
                    AttackPower = 20,
                    Name        = "Killer Tomatoesssss"
                };

                var health1 = new Health()
                {
                    IsGained = true,
                    Amount   = 100
                };

                var item1 = new Item()
                {
                    IsGained = true,
                    Object   = "The ring of Sauron"
                };

                var item2 = new Item()
                {
                    IsGained = true,
                    Object   = "Pop-Eye's Chicken Sandwhich"
                };

                event1.Fight  = fight1;
                event2.Health = health1;
                event3.Item   = item1;
                event4.Item   = item2;

                context.SaveChanges();
            }
        }
 public MarcidiaWorkerComponent(Mud mud)
     : base(mud)
 {
     workerThread = new Thread(DoWork);
 }