Initial Check-in for Alpha 2.0 source code.
Includes working Telnet server, working command engine and Character code.
This commit is contained in:
parent
224f754514
commit
3d8051c995
28 changed files with 1495 additions and 0 deletions
47
MudEngine/WinPC_Engine/Core/BaseCommand.cs
Normal file
47
MudEngine/WinPC_Engine/Core/BaseCommand.cs
Normal file
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using MudEngine.Game.Characters;
|
||||
using MudEngine.Core.Interface;
|
||||
|
||||
namespace MudEngine.Core
|
||||
{
|
||||
public abstract class BaseCommand : ICommand
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or Sets a collection of help topics related to this command.
|
||||
/// </summary>
|
||||
[Browsable(false)]
|
||||
public List<string> Help { get; set; }
|
||||
|
||||
public BaseCommand()
|
||||
{
|
||||
Help = new List<string>();
|
||||
this.Name = this.GetType().Name.Substring("Command".Length);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Executes the command for the character supplied.
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <param name="character"></param>
|
||||
public abstract void Execute(string command, StandardCharacter character);
|
||||
|
||||
public string Name {get;set;}
|
||||
|
||||
public string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue