private void createNewRoomToolStripMenuItem_Click(object sender, EventArgs e)
{
if (currentState == State.EDITING_WORLD)
{
StringPromptDialog dialog =
new StringPromptDialog("Please enter the name of the room");
if (dialog.ShowDialog() == DialogResult.OK)
{
if (isRoomNameUnique(dialog.UserInput))
{
Room room = new Room(dialog.UserInput);
world.Rooms.Add(room);
switchRooms(room);
}
else
{
MessageBox.Show(
"A room already exists with the name " + dialog.UserInput,
"Name Entry Error",
MessageBoxButtons.OK,
MessageBoxIcon.Exclamation);
}
}
}
}