Exemplo n.º 1
0
        public Boolean putIce()
        {
            int         d;
            Boolean     unheat = false;
            List <Tile> tlist;

            if (!buildable())
            {
                return(false);
            }
            State++;
            if (myBoard == null)
            {
                return(true);
            }
            if (myBoard.fireList.Contains(this))
            {
                unheat = true;
                myBoard.fireList.Remove(this);
            }
            tlist = myBoard.GetTiles();
            foreach (Tile other in tlist)
            {
                d = TileFactory.HexDistance(this, other);
                if (unheat)
                {
                    other.Temp -= Thermostat.CalcHeat(d);
                }
                other.Temp -= Thermostat.CalCold(d, State);
            }

            return(true);
        }
Exemplo n.º 2
0
        public Boolean setFire()
        {
            int         d;
            List <Tile> tlist;

            if (State != TileType.empty)
            {
                return(false);
            }
            State = TileType.fire;
            if (myBoard == null)
            {
                return(true);
            }
            myBoard.fireList.Add(this);
            tlist = myBoard.GetTiles();
            foreach (Tile other in tlist)
            {
                d           = TileFactory.HexDistance(this, other);
                other.Temp += Thermostat.CalcHeat(d);
            }
            return(true);
        }