Exemplo n.º 1
0
        public void sendCurrentBoardToClient()
        {
            //bool runEx = true;
            Helpfunctions hpf      = Helpfunctions.Instance;
            player        p        = p2;
            player        opponent = p1;

            if (this.currentplayer)
            {
                p        = p1;
                opponent = p2;
            }

            //DO we need this?
            //hpf.resetBuffer();
            //hpf.writeBufferToActionFile(p.client);
            hpf.resetBuffer();

            string dtimes = DateTime.Now.ToString("HH:mm:ss:ffff");

            /*int ownsecretcount = p.secrets.Count;
             * int enemySecretCount = opponent.secrets.Count;
             *
             * string enemysecretIds = "";
             * enemysecretIds = Probabilitymaker.Instance.getEnemySecretData();
             *
             *
             * hpf.writeToBuffer("#######################################################################");
             * hpf.writeToBuffer("#######################################################################");
             * hpf.writeToBuffer("start calculations, current time: " + dtimes + " V" + "115.55" + " " + p.settings);
             * hpf.writeToBuffer("#######################################################################");
             * hpf.writeToBuffer("mana " + p.curMana + "/" + p.maxMana);
             * hpf.writeToBuffer("emana " + opponent.maxMana);
             * hpf.writeToBuffer("own secretsCount: " + ownsecretcount);
             * hpf.writeToBuffer("enemy secretsCount: " + enemySecretCount + " ;" + enemysecretIds);
             *
             * Hrtprozis.Instance.printHero(runEx);
             * Hrtprozis.Instance.printOwnMinions(runEx);
             * Hrtprozis.Instance.printEnemyMinions(runEx);
             * Handmanager.Instance.printcards(runEx);
             * Probabilitymaker.Instance.printTurnGraveYard(runEx);
             * Probabilitymaker.Instance.printGraveyards(runEx);*/

            hpf.writeToBuffer(this.board.getCompleteBoardForSimulating(p.settings, "116.00", dtimes));
            hpf.writeBufferToFile(p.client);
            hpf.ErrorLog("sended");
        }