Esempio n. 1
0
        public Boolean PutIce(int i, int j)
        {
            int     d;
            Boolean unheat = false;
            Tile    tl     = this[i, j];

            if (!tl.buildable())
            {
                return(false);
            }
            tl.State++;
            if (fireList.Contains(tl))
            {
                unheat = true;
                fireList.Remove(tl);
            }
            foreach (Tile other in _mytiles)
            {
                d = Thermostat.HexDistance(tl, other);
                if (unheat)
                {
                    other.Temp -= Thermostat.CalcHeat(d);
                }
                other.Temp -= Thermostat.CalCold(d, tl.State);
            }

            return(true);
        }
Esempio n. 2
0
        public Boolean SetFire(int i, int j)
        {
            Tile tl = this[i, j];
            int  d;

            if (tl == outOfBounds)
            {
                return(false);
            }
            if (tl.State != TileType.empty)
            {
                return(false);
            }
            tl.State = TileType.fire;
            fireList.Add(tl);
            foreach (Tile other in _mytiles)
            {
                d           = Thermostat.HexDistance(tl, other);
                other.Temp += Thermostat.CalcHeat(d);
            }
            return(true);
        }