Created 2 new projects that are basically rewrites of the other two, many many many things are missing. but I want to effectively be able to switch states and commands without having to create dependencies.
Currently you can connect and Reach the "ConnectState" from there anything you state will just be an "InvalidCommand"
This commit is contained in:
parent
bec840f5e4
commit
a0c406d482
37 changed files with 960 additions and 3 deletions
25
MudEngine/WinPC.Engine/Core/Player.cs
Normal file
25
MudEngine/WinPC.Engine/Core/Player.cs
Normal file
|
@ -0,0 +1,25 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Net.Sockets;
|
||||
using WinPC.Engine.Abstract.Core;
|
||||
|
||||
namespace WinPC.Engine.Core
|
||||
{
|
||||
public class Player : IPlayer
|
||||
{
|
||||
public Socket Connection { get; private set; }
|
||||
public IState CurrentState { get; private set; }
|
||||
|
||||
public List<byte> buffer = new List<byte>();
|
||||
|
||||
public Player(IState initialState, Socket connection)
|
||||
{
|
||||
Connection = connection;
|
||||
CurrentState = initialState;
|
||||
}
|
||||
|
||||
public void Disconnect()
|
||||
{
|
||||
Connection.Close();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue