/// <summary> /// Message send at the begining of each round. Client recive current round number which has to be resend with his action. /// Client also recive possible move list in which are stored actions available for current robot position. /// Flag canMakeMove is set to true - user can perform action /// </summary> /// <param name="oSender"></param> /// <param name="oEventArgs"> Round number, possibleMoveList</param> void cl_RoundStartEvent(object oSender, GameRoundArgs oEventArgs) { _currentRoundNumber = oEventArgs.RoundNumber; EventLog.WriteMessageToLog(logFilePath, "ROUND nr " + _currentRoundNumber.ToString() + " is starting!"); _possibleMoveList = oEventArgs.possibleActionList; _history.Add(new ActionHistory(this.Login, _currentRoundNumber, _possibleMoveList)); _canMakeMove = true; }
void cl_RoundEndEvent(object oSender, GameRoundArgs oEventArgs) { currentRoundNumber = oEventArgs.RoundNumber; canMakeMove = false; }
void cl_RoundStartEvent(object oSender, GameRoundArgs oEventArgs) { currentRoundNumber = oEventArgs.RoundNumber; possibleMoveList = oEventArgs.possibleActionList; canMakeMove = true; }
/// <summary> /// Round end message. Flag canMakeMove is set to false /// </summary> /// <param name="oSender"></param> /// <param name="oEventArgs"></param> void cl_RoundEndEvent(object oSender, GameRoundArgs oEventArgs) { _currentRoundNumber = oEventArgs.RoundNumber; EventLog.WriteMessageToLog(logFilePath, "ROUND nr " + _currentRoundNumber.ToString() + " is ending!"); _canMakeMove = false; }