Ejemplo n.º 1
0
        public void Work(SettlersOfValgard game, Settler settler)
        {
            var table = Terrain.GatherTable;

            if (table == null || table.Count == 0)
            {
                //empty table
                VConsole.WriteWarning(settler + VConsole.Text(" is working on a barren ") + Terrain + VConsole.Text(" terrain!"));
                return;
            }

            var total  = table.Aggregate(0, (prev, next) => next.Item2 + prev);
            var random = Noise.GetRecursiveNoise(game.Seed, game.Settlement.Day, settler.Id) % total;
        }
Ejemplo n.º 2
0
 public SoVGameEvent(string nameText, VText description, GameEventType type, SettlersOfValgard game, VColor nameForeground = null) : base(nameText, description, type, game, nameForeground)
 {
     Game = game;
 }
 public StockpileChangeEvent(GameEventType type, SettlersOfValgard game, Ledger transaction) : base("Stockpile changed", transaction, type, game)
 {
     Transaction = transaction;
 }
 public void Work(SettlersOfValgard game, Settler settler)
 {
     Workplace.WorkplacePrototype.HostWorker(game, settler);
 }
Ejemplo n.º 5
0
 public abstract void HostWorker(SettlersOfValgard game, Settler worker);
Ejemplo n.º 6
0
 public static void DisplaySettler(Settler settler, SettlersOfValgard game, Command command)
 {
     Console.Clear();
     game.AddElement(new TitleElement(settler));
 }
Ejemplo n.º 7
0
 public static void DisplayBuilding(Building building, SettlersOfValgard game, Command command)
 {
     Clear();
     game.AddElement(new TitleElement(building));
 }
Ejemplo n.º 8
0
 public static void DisplayTerrain(Terrain terrain, SettlersOfValgard game, Command command)
 {
     game.AddElement(new TitleElement(terrain));
 }
Ejemplo n.º 9
0
 public static void DisplayFamily(Family family, SettlersOfValgard game, Command command)
 {
     Clear();
     game.AddElement(new TitleElement(family));
 }