public void MakeGame()
{
if (Password.Length == 0)
{
Password = "******";
}
GameName = Utils.RandomString(10);
if (FailedGame)
{
Console.WriteLine("{0}: [BNCS] Last game failed, sleeping.", Account);
System.Threading.Thread.Sleep(30000);
}
// We assume the game fails every game, until it proves otherwise at end of botthread.
FailedGame = true;
Console.WriteLine("{0}: [MCP] Creating game \"{1}\" with password \"{2}\"", Account, GameName, GamePassword);
byte[] temp = { 0x01, 0xff, 0x08 };
byte[] packet = m_mcp.BuildPacket(0x03, BitConverter.GetBytes((UInt16)GameRequestId), BitConverter.GetBytes(Utils.GetDifficulty(Difficulty)), temp, System.Text.Encoding.ASCII.GetBytes(GameName), GenericServer.zero,
System.Text.Encoding.ASCII.GetBytes(GamePassword), GenericServer.zero, GenericServer.zero);
m_mcp.Write(packet);
GameRequestId++;
}