private void OnSelectHand(BinaryReader packet) { int result; if (_hand > 0) { result = _hand; } else { result = _ai.OnRockPaperScissors(); } Connection.Send(CtosMessage.HandResult, (byte)result); }
private void OnRockPaperScissors(BinaryReader packet) { packet.ReadByte(); // player int result; if (_hand > 0) { result = _hand; } else { result = _ai.OnRockPaperScissors(); } Connection.Send(CtosMessage.Response, result); }