Began initial work on the game world. World, Realm, Zone, Room and Doorway classes created but not implemented.
This commit is contained in:
parent
b708a63273
commit
a3eb1b5fad
18 changed files with 313 additions and 36 deletions
39
MudEngine/WinPC_Engine/Game/World.cs
Normal file
39
MudEngine/WinPC_Engine/Game/World.cs
Normal file
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using MudEngine.Game.Environment;
|
||||
|
||||
namespace MudEngine.Game
|
||||
{
|
||||
public class World
|
||||
{
|
||||
public StandardGame Game { get; private set; }
|
||||
|
||||
public World(StandardGame game)
|
||||
{
|
||||
this.Game = game;
|
||||
this._RealmCollection = new List<Realm>();
|
||||
}
|
||||
|
||||
public void CreateRealm(String name, String description)
|
||||
{
|
||||
Realm r = new Realm(this.Game, name, description);
|
||||
|
||||
this._RealmCollection.Add(r);
|
||||
}
|
||||
|
||||
public Realm GetRealm(String name)
|
||||
{
|
||||
var v = from realm in this._RealmCollection
|
||||
where realm.Name == name
|
||||
select realm;
|
||||
|
||||
Realm r = v.First();
|
||||
return r;
|
||||
}
|
||||
|
||||
private List<Realm> _RealmCollection;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue