// send the list of possible moves of the clicked private void PossiblePathAckEvent(string reqData, Hashtable roomClassList) { /* isHost+":"+roomNo+":"+"PossibleMoveReq"+":"+myPieceName+":"+myStartPos */ List<int> PossibleMoveList = new List<int>(); roomData = reqData.Split(':'); try { /* roomClassList: key = room number, value = room class * find a right room for received room number from a client * and send acknowledgement */ room = (RoomHandler)roomClassList[roomData[1]]; if (room.isStart == true) { /* only startPos and finalPos are needed to proceed the movement * since the server knows a board status */ PossibleMoveList = room.getPossibleMove(int.Parse(roomData[4])); /* send to the client only if PossibleMoveList contains an integer value * meaning the clicked piece can be moved */ if (PossibleMoveList != null) { Send(string.Join(":", PossibleMoveList) + ":" + roomData[4] + ":PossiblePathAck"); } } else Send("NotStartNoti"); } //Handle Exception catch (Exception ex) { Console.WriteLine(ex); return; } }