Exemplo n.º 1
0
    public void AddContract()
    {
        if (trader == null)
        {
            return;
        }
        if (settlement == null)
        {
            return;
        }
        if (workshop == null)
        {
            return;
        }
        List <Contract> contracts = trader.GetContracts();

        contracts.Add(new Production(settlement.GetPosition(), settlement as Settlement, trader as Trader, settlement.GetWallet(), workshop as Workshop));
        trader.SetContracts(contracts);
    }
Exemplo n.º 2
0
    public void AddContract()
    {
        if (desire == null)
        {
            return;
        }
        if (trader == null)
        {
            return;
        }
        if (settlement == null)
        {
            return;
        }

        List <Contract> contracts = trader.GetContracts();

        contracts.Add(new Trade(trader as Trader, settlement as Settlement, settlement.GetPosition(), desire as Desire, desire.GetPrice()));
        trader.SetContracts(contracts);
    }