private void _SendToBase(CardReader reader, PlayerCard card) { var availableStation = _GetAvailableStations(card.BaseNumber).FirstOrDefault(); if (availableStation != null) { Console.WriteLine($"Sending to base {card.BaseNumber + 1}"); Console.WriteLine("Awaiting card write..."); reader.Write(CardData.Create(card.ToStringNoUser())); var socket = _stationIds[availableStation]; socket.SendData(card.ToString()); _incomingCards.Remove(card); _takenStations.Add(availableStation); _cardsInSystem.Add(card.PlayerID); Console.WriteLine($"SEND PLAYER TO STATION {card.BaseNumber}", Color.HotPink); Console.WriteLine(DASHES, Color.Green); Console.WriteLine($"\n{DASHES}", Color.Gray); Console.WriteLine($"Sent {card.Printable()}", Color.Gray); Console.WriteLine(DASHES, Color.Gray); } else { Console.WriteLine("No available stations at this point. Please check back later", Color.Red); } }
private PlayerCard _FormatCard(CardReader reader) { Console.WriteLine(DASHES, Color.Yellow); Console.WriteLine("Formatting card"); var card = PlayerCard.Default; reader.Write(CardData.Create(card.ToString())); Console.WriteLine("Card successfully formatted", Color.Green); Console.WriteLine(DASHES, Color.Yellow); return(card); }