[ADDED] a begin for the turn base

This commit is contained in:
Lars
2020-10-23 16:46:29 +02:00
parent eee4f0347f
commit 13cf0e44ee
7 changed files with 82 additions and 7 deletions

View File

@@ -38,6 +38,7 @@ namespace SharedClientServer
public enum GameCommand
{
START_GAME,
INITIALIZE,
TIMER_ELAPSED,
NEXT_ROUND
}
@@ -220,6 +221,17 @@ namespace SharedClientServer
}); ;
}
public static byte[] ConstructGameInitializeData(string userName, int lobbyID)
{
dynamic payload = new
{
id = lobbyID,
command = GameCommand.INITIALIZE,
username = userName
};
return GetMessageToSend(GAME, payload);
}
public static byte[] ConstructGameTimerElapsedMessage(int lobbyID)
{
return GetMessageToSend(GAME, new

View File

@@ -17,6 +17,7 @@ namespace Client
private bool _lobbyJoinable;
//private List<string> _usernames;
private List<User> _users;
private int _userDrawing;
//public void AddUsername(string username, out bool success)
//{
@@ -36,6 +37,7 @@ namespace Client
//_usernames = new List<string>();
_users = new List<User>();
_lobbyJoinable = true;
_userDrawing = 0;
}
public void AddUser(string username, out bool succes)
@@ -95,5 +97,11 @@ namespace Client
set { _lobbyJoinable = value; }
}
public int UserDrawing
{
get { return _userDrawing; }
set { _userDrawing = value; }
}
}
}