using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Text;
namespace MudEngine.Core
{
public abstract class BaseGame : BaseObject
{
///
/// Enables or Disables the server.
///
[Category("Game Settings")]
[Description("Enables or Disabels the server.")]
public bool EnableServer { get; set; }
///
/// Enables or Disables the Auto Save feature.
///
[Category("Game Settings")]
[Description("Enables or Disables the Auto Save feature.")]
public bool EnableAutoSave { get; set; }
///
/// Gets if the game is currently running or not.
///
public bool IsRunning { get; protected set; }
///
/// Gets or Sets the auto-save interval for the game during runtime
///
public int AutoSaveInterval { get; set; }
///
/// Gets or Sets the minimum size a users account password must be
///
public int PasswordMinimumSize { get; set; }
///
/// Gets or Sets the maximum number of players allowed to connect to the server at once.
///
public int MaximumPlayers { get; set; }
///
/// Gets a reference to the collection of players currently connected to the server
///
public Dictionary ConnectedPlayers { get; private set; }
///
/// Gets or Sets the current version of the game.
///
public string Version { get; set; }
///
/// Gets or Sets the environment that will be used when a new user account is created.
///
public IEnvironment InitialEnvironment { get; set; }
public BaseGame()
{
this.ConnectedPlayers = new Dictionary();
this.ID = 0;
}
public abstract void Initialize();
public abstract void Update();
public abstract void Shutdown();
public abstract void OnConnect(TcpClient client);
public abstract void OnDisconnect(TcpClient client);
public abstract int GetAvailableID();
}
}