Пример #1
0
 public String GetNickname()
 {
     events.PlayerInitialize += messenger.PlayerEnterNickname;
     events.OnInitializeNickname();
     events.PlayerInitialize -= messenger.PlayerEnterNickname;
     inputLine          = ConsoleGame.ReadLine().Trim().Replace(" ", "");
     _player.PlayerName = inputLine;
     return(_player.PlayerName);
 }
Пример #2
0
 public Int32 GetBalance()
 {
     events.PlayerInitialize += messenger.PlayerEnterBalance;
     events.OnInitializeNickname();
     inputLine = ConsoleGame.ReadLine().Trim().Replace(" ", "");
     Int32.TryParse(inputLine, out newBalance);
     if (newBalance < 0)
     {
         events.OnInitializeNickname();
         inputLine = ConsoleGame.ReadLine().Trim().Replace(" ", "");
     }
     events.PlayerInitialize -= messenger.PlayerEnterBalance;
     _player.PlayerBalance    = newBalance;
     return(_player.PlayerBalance);
 }