public void empezar(string nombre1, string ip1, string puerto1, string nombre2, string ip2, string puerto2, int p) { _partidas = p; _nombrePlayer1 = nombre1; _nombrePlayer2 = nombre2; _bot1 = new BotConnection(ip1, puerto1, botListo, sliderVelocidad.value); _bot2 = new BotConnection(ip2, puerto2, botListo, sliderVelocidad.value); }
public Truco(string p1n, BotConnection p1b, InterfazPlayer p1i, string p2n, BotConnection p2b, InterfazPlayer p2i, int p, Resultado r) { _partidas = p; _resultado = r; _player1 = new Player(p1n, this, p1b, p1i); _player2 = new Player(p2n, this, p2b, p2i); iniciarPartida(); }
public ChatPage() { this.InitializeComponent(); connection = new BotConnection(ConstantHelper.ACCOUNT_NAME); messageList = new ObservableCollection <MessageListItem>(); MessageListView.ItemsSource = messageList; var messageTask = connection.GetMessagesAsync(messageList); }
public BotChatViewModel(BotObject bot, ListView messagesListView, StackLayout quickReplyStack) { this.connection = new BotConnection(bot); this.botId = bot.BotId; this.messagesListView = messagesListView; this.quickReplyStack = quickReplyStack; this.profileImageUrl = bot.ImageUrl; this.OutGoingText = null; this.Messages = new ObservableCollection<MessageViewModel>(); this.GetMessagesAsync(this.Messages); this.outgoingText = null; }
public Player(string n, Truco t, BotConnection b, InterfazPlayer i) { nombre = n; _truco = t; _bot = b; if (_bot != null) { _bot.setPlayer(this); } _interfaz = i; if (_interfaz != null) { _interfaz.asignarNombre(n); } _cartas = new List <Carta>(); _cartasEnMesa = new List <Carta>(); _puntaje = 0; _partidasGanadas = 0; }
static void Main(string[] args) { BotConnection botConn = null; while (true) { try { var botToBase = new BotToBaseImpl(); botConn = new BotConnection(botToBase, "r2d2"); BaseToBotPrx bot = botConn.BotProxy; while (true) { Console.WriteLine("Choose a command:"); Console.WriteLine(" 1. Play sound"); Console.WriteLine(" 2. Move using XBox controller"); switch (Console.ReadKey(true).Key) { case ConsoleKey.D1: PlaySound(bot); break; case ConsoleKey.D2: XboxControls(bot, botToBase); break; } } } catch (Exception e) { Console.Error.WriteLine(e.ToString()); } finally { if (botConn != null) { botConn.Dispose(); } } } }