コード例 #1
0
        /// <summary>
        /// setting gold locations
        /// </summary>
        /// <param name="roomNumber"></param>
        public void updateExploredAndGold(int roomNumber)
        {
            int  gold = r.Next(2) + 3;
            Room rm   = new Room(roomNumber);

            explored.Add(rm);

            if (!explored.Contains(rm))
            {
                p.setGold(p.getGold() + gold);
            }
        }
コード例 #2
0
 public void updateGold(Room room)
 {
     MyPlayer.setGold(MyPlayer.getGold() + MyMap.updateExploredAndReturnGold(room.getIntegerForm()));
 }