コード例 #1
0
        public virtual void PlacePC()
        {
            int i;
            int j;

            do
            {
                i = Rng.Random.Next(Map.Width);
                j = Rng.Random.Next(Map.Height);
            } while (!pc.CanWalkOn(viewPort.GetDisplayCharacter(Map[i, j])));
            pc.Position.X = i;
            pc.Position.Y = j;
        }
コード例 #2
0
 public bool IsFreeSpace(Position position, Being being)
 {
     return
         (GetBeingAt(position) == null &&
          being.CanWalkOn(ViewPort.GetDisplayCharacter(Level.Map[position])));
 }