You found a genuine bug. The internal loop casts a dictionary entry to a Room, where it should iterate over all roomList.Values instead.
If you want to compile it yourself, then the correct GetRoomByName method is:
Code: Select all
public Room GetRoomByName(string roomName)
{
Room room = null;
foreach (Room r in roomList.Values)
{
if (r.GetName() == roomName)
{
room = r;
break;
}
}
return room;
}
I've ran through the code and checked all iterations over a hashtable, and found another bug like that as well as some of the documentation being wrong in that regard.
I'll make sure that fix comes out together with the 1.1 release.
BTW - did you get all my PM's? They are sitting in my forum outbox and I havent heard back from you.
/Thomas