예제 #1
0
 public void setCreature(Creature creature)
 {
     this.creature = creature;
 }
예제 #2
0
        //edit to return room when it places creature
        private Room PlaceCreature(Creature myCreature)
        {
            Random rand = new Random();
            int randomIndex = rand.Next(1, 20);

            if (RoomHold[randomIndex].getCreature() == null)
            {
                RoomHold[randomIndex].setCreature(myCreature);
                return RoomHold[randomIndex];
            }
            else
            {
                return null;
            }
        }