Beispiel #1
0
 /// <summary>
 /// Message send at the end of the game
 /// </summary>
 /// <param name="oSender"></param>
 /// <param name="oEventArgs"></param>
 void cl_GameEndEvent(object oSender, GamePlayArgs oEventArgs)
 {
     EventLog.WriteMessageToLog(logFilePath, "Game is ending!");
     _isGameRunning = false;
     _canMakeMove   = false;
     MessageBox.Show("My final Score: " + oEventArgs.finalScore.ToString());
 }
Beispiel #2
0
 private void GamePlay_GamePlayCompleted(object sender, GamePlayArgs e)
 {
     foreach (var outputString in e.Output)
     {
         Console.WriteLine(outputString);
     }
 }
Beispiel #3
0
        /// <summary>
        /// Message send by server at the beging of each game.
        /// Client can start his logic in Play Game method
        /// </summary>
        /// <param name="oSender">Arena Server object</param>
        /// <param name="oEventArgs"> Initial round number</param>
        void cl_GameStartEvent(object oSender, GamePlayArgs oEventArgs)
        {
            _allRoundsNumber    = oEventArgs.initalRoundNumber;
            _currentMap         = oEventArgs.map;
            _initialMap         = oEventArgs.map;
            _myScore            = 0;
            _currentRoundNumber = 0;
            _myPosition         = _startingPosition;
            _currentMap         = _initialMap.Copy();
            _myTeam             = oEventArgs.team;
            _isGameRunning      = true;
            EventLog.WriteMessageToLog(logFilePath, "Game is starting!");
            Dispatcher.Invoke(() => repaintMap(_startingPosition));

            PlayGame();
        }
Beispiel #4
0
 void cl_GameEndEvent(object oSender, GamePlayArgs oEventArgs)
 {
     MessageBox.Show("My final Score: " + myPoints.ToString());
 }
Beispiel #5
0
 void cl_GameStartEvent(object oSender, GamePlayArgs oEventArgs)
 {
     team            = oEventArgs.team;
     allRoundsNumber = oEventArgs.initalRoundNumber;
     PlayGame();
 }