Beispiel #1
0
        public static void GetMoveFromUser(AttemptMovePacket p)
        {
            var origin      = getPositionFromUser("the Piece you would like to move");
            var destination = getPositionFromUser("Where you would like to move the piece to");

            p.origin = origin;
            p.dest   = destination;
        }
Beispiel #2
0
        public static async void UserGetMoveAndSend(AttemptMovePacket packet, NetClient client)
        {
            GetMoveFromUser((AttemptMovePacket)packet);
            var ans = client.CreateMessage();

            packet.PackIntoNetMessage(ans);
            client.SendMessage(ans, client.ServerConnection,
                               NetDeliveryMethod.ReliableOrdered);
            packet.Recycle();
        }