C# :: Aufgabe #196 :: Lösung #1

3 Lösungen Lösungen öffentlich
#196

Tic Tac Toe - Den Spieleklassiker grafisch darstellen

Fortgeschrittener - C# von Gelöschte Person - 18.12.2017 um 21:18 Uhr
Setze den allbekannten Klassiker Tic Tac Toe in einer Windows Form um. Es sollte Grafisch erkennbar sein, welche Felder schon belegt wurden. Am sollte ein Spieler Gewinnen so soll dies angezeigt und das Spiel anschließen neu gestartet werden. Sollten alle Felder gefüllt sein und kein Gegner feststehen, so sollte ein Unentschieden angezeigt, und anschließen das Spiel neu gestartet werden. Vorzugsweise sollte auch erkennbar sein, welcher Spieler gerade am Zug ist. Ein Computergegner ist nicht von Nöten, solltet ihr aber Lust darauf haben so könnt ihr auch das umsetzen.
#1
4 Kommentare
vote_ok
von Z3RP (1020 Punkte) - 21.12.2017 um 13:05 Uhr
Ich hatte das jetzt noch ein Neuronal Netz mit rein programmiert ich hoffe dich stört das nicht.

Quellcode ausblenden C#-Code
using NeuronalNetwork;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;

namespace TicTacToe
{
    public partial class Form1 : Form
    {
        Bitmap cross = new Bitmap(@"C:\Users\npreen.CARGOSOFT\source\repos\TicTacToe\TicTacToe\Images\cross.png");
        Bitmap circle = new Bitmap(@"C:\Users\npreen.CARGOSOFT\source\repos\TicTacToe\TicTacToe\Images\circle.png");
        int player = 1;
        bool game = true;
        Random rnd = new Random(DateTime.Now.Millisecond);
        Bot b1;

        PictureBox[] pBoxArr = new PictureBox[9];

        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            b1 = new Bot(rnd);
            pBoxArr[0] = pictureBox1;
            pBoxArr[1] = pictureBox2;
            pBoxArr[2] = pictureBox3;
            pBoxArr[3] = pictureBox4;
            pBoxArr[4] = pictureBox5;
            pBoxArr[5] = pictureBox6;
            pBoxArr[6] = pictureBox7;
            pBoxArr[7] = pictureBox8;
            pBoxArr[8] = pictureBox9;

            foreach (PictureBox pb in pBoxArr)
            {

                pb.BackgroundImage = null;

            }

            label1.Text = "Player 1 ist an der Reihe!";
            pictureBox10.BackgroundImage = cross;
            game = true;
            player = 1;

        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {
            if (game)
            {
                if (player == 1)
                {
                    if (pictureBox1.BackgroundImage == null)
                    {
                        pictureBox1.BackgroundImage = cross;
                        player = -1;
                        gameChange();
                    }
                }
                else
                {
                    if (pictureBox1.BackgroundImage == null)
                    {
                        pictureBox1.BackgroundImage = circle;
                        player = 1;
                        gameChange();
                    }
                }
            }
        }

        private void pictureBox2_Click(object sender, EventArgs e)
        {
            if (game)
            {
                if (player == 1)
                {
                    if (pictureBox2.BackgroundImage == null)
                    {
                        pictureBox2.BackgroundImage = cross;
                        player = -1;
                        gameChange();
                    }
                }
                else
                {
                    if (pictureBox2.BackgroundImage == null)
                    {
                        pictureBox2.BackgroundImage = circle;
                        player = 1;
                        gameChange();
                    }
                }
            }
        }

        private void pictureBox3_Click(object sender, EventArgs e)
        {
            if (game)
            {
                if (player == 1)
                {
                    if (pictureBox3.BackgroundImage == null)
                    {
                        pictureBox3.BackgroundImage = cross;
                        player = -1;
                        gameChange();
                    }
                }
                else
                {
                    if (pictureBox3.BackgroundImage == null)
                    {
                        pictureBox3.BackgroundImage = circle;
                        player = 1;
                        gameChange();
                    }
                }
            }
        }

        private void pictureBox4_Click(object sender, EventArgs e)
        {
            if (game)
            {
                if (player == 1)
                {
                    if (pictureBox4.BackgroundImage == null)
                    {
                        pictureBox4.BackgroundImage = cross;
                        player = -1;
                        gameChange();
                    }
                }
                else
                {
                    if (pictureBox4.BackgroundImage == null)
                    {
                        pictureBox4.BackgroundImage = circle;
                        player = 1;
                        gameChange();
                    }
                }
            }
        }

        private void pictureBox5_Click(object sender, EventArgs e)
        {
            if (game)
            {
                if (player == 1)
                {
                    if (pictureBox5.BackgroundImage == null)
                    {
                        pictureBox5.BackgroundImage = cross;
                        player = -1;
                        gameChange();
                    }
                }
                else
                {
                    if (pictureBox5.BackgroundImage == null)
                    {
                        pictureBox5.BackgroundImage = circle;
                        player = 1;
                        gameChange();
                    }
                }
            }
        }

        private void pictureBox6_Click(object sender, EventArgs e)
        {
            if (game)
            {
                if (player == 1)
                {
                    if (pictureBox6.BackgroundImage == null)
                    {
                        pictureBox6.BackgroundImage = cross;
                        player = -1;
                        gameChange();
                    }
                }
                else
                {
                    if (pictureBox6.BackgroundImage == null)
                    {
                        pictureBox6.BackgroundImage = circle;
                        player = 1;
                        gameChange();
                    }
                }
            }
        }

        private void pictureBox7_Click(object sender, EventArgs e)
        {
            if (game)
            {
                if (player == 1)
                {
                    if (pictureBox7.BackgroundImage == null)
                    {
                        pictureBox7.BackgroundImage = cross;
                        player = -1;
                        gameChange();
                    }
                }
                else
                {
                    if (pictureBox7.BackgroundImage == null)
                    {
                        pictureBox7.BackgroundImage = circle;
                        player = 1;
                        gameChange();
                    }
                }
            }
        }

        private void pictureBox8_Click(object sender, EventArgs e)
        {
            if (game)
            {
                if (player == 1)
                {
                    if (pictureBox8.BackgroundImage == null)
                    {
                        pictureBox8.BackgroundImage = cross;
                        player = -1;
                        gameChange();
                    }
                }
                else
                {
                    if (pictureBox8.BackgroundImage == null)
                    {
                        pictureBox8.BackgroundImage = circle;
                        player = 1;
                        gameChange();
                    }
                }
            }
        }

        private void pictureBox9_Click(object sender, EventArgs e)
        {
            if (game)
            {
                if (player == 1)
                {
                    if (pictureBox9.BackgroundImage == null)
                    {
                        pictureBox9.BackgroundImage = cross;
                        player = -1;
                        gameChange();
                    }
                }
                else
                {
                    if (pictureBox9.BackgroundImage == null)
                    {
                        pictureBox9.BackgroundImage = circle;
                        player = 1;
                        gameChange();
                    }
                }
            }
        }


        private void gameChange()
        {

            label1.Update();

            if (player == 1)
            {
                label1.Text = "Player 1 ist an der Reihe!";
                pictureBox10.BackgroundImage = cross;
            }
            else
            {
                label1.Text = "Player 2 ist an der Reihe!";
                pictureBox10.BackgroundImage = circle;
            }

            if (pictureBox1.BackgroundImage == pictureBox2.BackgroundImage && pictureBox2.BackgroundImage == pictureBox3.BackgroundImage)
            {
                if (pictureBox1.BackgroundImage == cross)
                {
                    label1.Text = "Player 1 hat Gewonnen";
                    pictureBox10.BackgroundImage = cross;
                    game = false;
                }
                else if (pictureBox1.BackgroundImage == circle)
                {
                    label1.Text = "Player 2 hat Gewonnen";
                    pictureBox10.BackgroundImage = circle;
                    game = false;
                }
            }

            if (pictureBox1.BackgroundImage == pictureBox4.BackgroundImage && pictureBox4.BackgroundImage == pictureBox7.BackgroundImage)
            {
                if (pictureBox1.BackgroundImage == cross)
                {
                    label1.Text = "Player 1 hat Gewonnen";
                    pictureBox10.BackgroundImage = cross;
                    game = false;
                }
                else if (pictureBox1.BackgroundImage == circle)
                {
                    label1.Text = "Player 2 hat Gewonnen";
                    pictureBox10.BackgroundImage = circle;
                    game = false;
                }
            }

            if (pictureBox1.BackgroundImage == pictureBox5.BackgroundImage && pictureBox5.BackgroundImage == pictureBox9.BackgroundImage)
            {
                if (pictureBox1.BackgroundImage == cross)
                {
                    label1.Text = "Player 1 hat Gewonnen";
                    pictureBox10.BackgroundImage = cross;
                    game = false;
                }
                else if (pictureBox1.BackgroundImage == circle)
                {
                    label1.Text = "Player 2 hat Gewonnen";
                    pictureBox10.BackgroundImage = circle;
                    game = false;
                }
            }

            if (pictureBox2.BackgroundImage == pictureBox5.BackgroundImage && pictureBox5.BackgroundImage == pictureBox8.BackgroundImage)
            {
                if (pictureBox2.BackgroundImage == cross)
                {
                    label1.Text = "Player 1 hat Gewonnen";
                    pictureBox10.BackgroundImage = cross;
                    game = false;
                }
                else if (pictureBox2.BackgroundImage == circle)
                {
                    label1.Text = "Player 2 hat Gewonnen";
                    pictureBox10.BackgroundImage = circle;
                    game = false;
                }
            }

            if (pictureBox3.BackgroundImage == pictureBox6.BackgroundImage && pictureBox6.BackgroundImage == pictureBox9.BackgroundImage)
            {
                if (pictureBox3.BackgroundImage == cross)
                {
                    label1.Text = "Player 1 hat Gewonnen";
                    pictureBox10.BackgroundImage = cross;
                    game = false;
                }
                else if (pictureBox3.BackgroundImage == circle)
                {
                    label1.Text = "Player 2 hat Gewonnen";
                    pictureBox10.BackgroundImage = circle;
                    game = false;
                }
            }

            if (pictureBox4.BackgroundImage == pictureBox5.BackgroundImage && pictureBox5.BackgroundImage == pictureBox6.BackgroundImage)
            {
                if (pictureBox4.BackgroundImage == cross)
                {
                    label1.Text = "Player 1 hat Gewonnen";
                    pictureBox10.BackgroundImage = cross;
                    game = false;
                }
                else if (pictureBox4.BackgroundImage == circle)
                {
                    label1.Text = "Player 2 hat Gewonnen";
                    pictureBox10.BackgroundImage = circle;
                    game = false;
                }
            }

            if (pictureBox3.BackgroundImage == pictureBox5.BackgroundImage && pictureBox5.BackgroundImage == pictureBox7.BackgroundImage)
            {
                if (pictureBox3.BackgroundImage == cross)
                {
                    label1.Text = "Player 1 hat Gewonnen";
                    pictureBox10.BackgroundImage = cross;
                    game = false;
                }
                else if (pictureBox3.BackgroundImage == circle)
                {
                    label1.Text = "Player 2 hat Gewonnen";
                    pictureBox10.BackgroundImage = circle;
                    game = false;
                }
            }

            if (pictureBox7.BackgroundImage == pictureBox8.BackgroundImage && pictureBox8.BackgroundImage == pictureBox9.BackgroundImage)
            {
                if (pictureBox7.BackgroundImage == cross)
                {
                    label1.Text = "Player 1 hat Gewonnen";
                    pictureBox10.BackgroundImage = cross;
                    game = false;
                }
                else if (pictureBox7.BackgroundImage == circle)
                {
                    label1.Text = "Player 2 hat Gewonnen";
                    pictureBox10.BackgroundImage = circle;
                    game = false;
                }
            }

            if (game)
            {
                game = false;
                foreach (PictureBox pb in pBoxArr)
                {
                    if (pb.BackgroundImage == null)
                    {
                        game = true;
                    }
                }

                if (!game)
                {
                    label1.Text = "Unentschieden";
                    pictureBox10.BackgroundImage = null;
                }
            }

            if (player == -1 && game)
            {
                b1.nn.resetOutputValue();

                for (int i = 0; i < pBoxArr.Length; i++)
                {
                    if (pBoxArr[i].BackgroundImage == cross)
                    {
                        b1.ineuArr[i].setValue(1);
                    }
                    else if (pBoxArr[i].BackgroundImage == circle)
                    {
                        b1.ineuArr[i].setValue(-1);
                    }
                    else if (pBoxArr[i].BackgroundImage == null)
                    {
                        b1.ineuArr[i].setValue(0);
                    }
                }

                OutputNeuron bestNeuron = new OutputNeuron();
                float bestValue = -99999999;

                for (int i = 0; i < b1.oneuArr.Length; i++)
                {
                    if (b1.oneuArr[i].getOutputValue() > bestValue && pBoxArr[i].BackgroundImage == null)
                    {
                        bestNeuron = b1.oneuArr[i];
                        bestValue = b1.oneuArr[i].getOutputValue();
                    }
                }

                for (int i = 0; i < pBoxArr.Length; i++)
                {
                    if (b1.oneuArr[i] == bestNeuron)
                    {
                        pBoxArr[i].BackgroundImage = circle;
                        player = 1;
                        gameChange();
                    }
                }
            }

        }

        private void button1_Click(object sender, EventArgs e)
        {
            
            foreach (PictureBox pb in pBoxArr)
            {
                pb.BackgroundImage = null;

            }

            label1.Text = "Player 1 ist an der Reihe!";
            pictureBox10.BackgroundImage = cross;
            game = true;
            player = 1;

            bool isLoaded = true;

            StreamReader sr = new StreamReader("guterBot.txt");
            char c = ';';
            String[] s = sr.ReadLine().Split(c);

            int c1 = 0;

            foreach (string s1 in s)
            {
                if(b1.mValues[c1] != Convert.ToInt32(s1))
                {
                    isLoaded = false;
                }
                c1++;
            }

            if (isLoaded)
            {
                label2.Text = "Bot geladen.";
            }
            else
            {
                label2.Text = "Bot nicht geladen.";
            }

            sr.Close();

            gameChange();
        }

        
        int bc = 0;
        private void saveBot_Click(object sender, EventArgs e)
        {
            while(File.Exists(@"C:\Users\npreen.CARGOSOFT\source\repos\TicTacToe\TicTacToe\bin\Debug\Bots\b" + bc + ".txt"))
            {
                bc++;
            }
            StreamWriter sw = new StreamWriter(@"C:\Users\npreen.CARGOSOFT\source\repos\TicTacToe\TicTacToe\bin\Debug\Bots\b"+bc+".txt");

            //sw.WriteLine("{0}", string.Join(";", mValues));
            sw.Close();
        }

        private void loadBot_Click(object sender, EventArgs e)
        {
            StreamReader sr = new StreamReader("guterBot.txt");
            char c = ';';
            String[] s = sr.ReadLine().Split(c);

            int c1 = 0;

            foreach (string s1 in s)
            {
                b1.mValues[c1] = Convert.ToInt32(s1);
                c1++;
            }

            b1.nn.createMesh(b1.mValues);

            sr.Close();
        }

        private void newBot_Click(object sender, EventArgs e)
        {
            b1 = new Bot(rnd);
            foreach (PictureBox pb in pBoxArr)
            {

                pb.BackgroundImage = null;

            }

            label1.Text = "Player 1 ist an der Reihe!";
            pictureBox10.BackgroundImage = cross;
            game = true;
            player = 1;
        }

    }
}


Quellcode ausblenden C#-Code
using NeuronalNetwork;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace TicTacToe
{
    class Bot
    {
        Random rnd;
        public NeuronalNet nn;
        InputNeuron i1 = new InputNeuron();
        InputNeuron i2 = new InputNeuron();
        InputNeuron i3 = new InputNeuron();
        InputNeuron i4 = new InputNeuron();
        InputNeuron i5 = new InputNeuron();
        InputNeuron i6 = new InputNeuron();
        InputNeuron i7 = new InputNeuron();
        InputNeuron i8 = new InputNeuron();
        InputNeuron i9 = new InputNeuron();

        OutputNeuron o1 = new OutputNeuron();
        OutputNeuron o2 = new OutputNeuron();
        OutputNeuron o3 = new OutputNeuron();
        OutputNeuron o4 = new OutputNeuron();
        OutputNeuron o5 = new OutputNeuron();
        OutputNeuron o6 = new OutputNeuron();
        OutputNeuron o7 = new OutputNeuron();
        OutputNeuron o8 = new OutputNeuron();
        OutputNeuron o9 = new OutputNeuron();

        public InputNeuron[] ineuArr = new InputNeuron[9];

        public OutputNeuron[] oneuArr = new OutputNeuron[9];
        public float[] mValues;

        public Bot(Random rnd1)
        {
            rnd = rnd1;
            createNeuralNet();
        }

        public void createNeuralNet()
        {
            i1 = new InputNeuron();
            i2 = new InputNeuron();
            i3 = new InputNeuron();
            i4 = new InputNeuron();
            i5 = new InputNeuron();
            i6 = new InputNeuron();
            i7 = new InputNeuron();
            i8 = new InputNeuron();
            i9 = new InputNeuron();

            o1 = new OutputNeuron();
            o2 = new OutputNeuron();
            o3 = new OutputNeuron();
            o4 = new OutputNeuron();
            o5 = new OutputNeuron();
            o6 = new OutputNeuron();
            o7 = new OutputNeuron();
            o8 = new OutputNeuron();

            ineuArr[0] = i1;
            ineuArr[1] = i2;
            ineuArr[2] = i3;
            ineuArr[3] = i4;
            ineuArr[4] = i5;
            ineuArr[5] = i6;
            ineuArr[6] = i7;
            ineuArr[7] = i8;
            ineuArr[8] = i9;

            oneuArr[0] = o1;
            oneuArr[1] = o2;
            oneuArr[2] = o3;
            oneuArr[3] = o4;
            oneuArr[4] = o5;
            oneuArr[5] = o6;
            oneuArr[6] = o7;
            oneuArr[7] = o8;
            oneuArr[8] = o9;

            nn = new NeuronalNet();

            nn.addInputNeuron(i1);
            nn.addInputNeuron(i2);
            nn.addInputNeuron(i3);
            nn.addInputNeuron(i4);
            nn.addInputNeuron(i5);
            nn.addInputNeuron(i6);
            nn.addInputNeuron(i7);
            nn.addInputNeuron(i8);
            nn.addInputNeuron(i9);

            nn.addOutputNeuron(o1);
            nn.addOutputNeuron(o2);
            nn.addOutputNeuron(o3);
            nn.addOutputNeuron(o4);
            nn.addOutputNeuron(o5);
            nn.addOutputNeuron(o6);
            nn.addOutputNeuron(o7);
            nn.addOutputNeuron(o8);
            nn.addOutputNeuron(o9);

            mValues = new float[81];

            for (int i = 0; i < mValues.Length; i++)
            {
                //Thread.Sleep(10);
                mValues[i] = rnd.Next(0, 21) - 10;
            }

            nn.createMesh(mValues);

        }
    }
}




Quellcode ausblenden C#-Code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NeuronalNetwork
{
    class InputNeuron
    {
        private float value;
        private List<Link> links;

        public InputNeuron()
        {
            value = 0;
            this.links = new List<Link>();
        }

        public void addLink(Link l)
        {
            links.Add(l);
        }

        public float getValue()
        {
            return value;
        }

        public void setValue(float v)
        {
            value = v;

            foreach(Link l in links)
            {
                l.getOutput().setOutputValue(l.getCalcValue());
            }
        }
    }
}


Quellcode ausblenden C#-Code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NeuronalNetwork
{
    class Link
    {
        private InputNeuron input;
        private OutputNeuron output;
        private float value;
        private int calc;

        public Link(InputNeuron input, OutputNeuron output, float value, int calc)
        {
            this.input = input;
            this.output = output;
            this.value = value;
            this.calc = calc;
        }

        public OutputNeuron getOutput()
        {
            return output;
        }

        public float getCalcValue()
        {
            //if (calc == 0)
            //{
            //    return input.getValue() + value;
            //}
            //if (calc == 1)
            //{
            //    return input.getValue() - value;
            //}
            //if (calc == 2)
            //{
            //    return input.getValue() * value;
            //}
            return input.getValue() * value;
        }
    }
}


Quellcode ausblenden C#-Code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NeuronalNetwork
{
    class NeuronalNet
    {
        private List<InputNeuron> inputs;
        public List<OutputNeuron> outputs;
        Random rnd = new Random(DateTime.Now.Millisecond);

        public NeuronalNet()
        {
            this.inputs = new List<InputNeuron>();
            this.outputs = new List<OutputNeuron>();
        }

        public void addInputNeuron(InputNeuron i)
        {
            inputs.Add(i);
        }

        public void addOutputNeuron(OutputNeuron o)
        {
            outputs.Add(o);
        }

        public bool createMesh(float[] mValues)
        {
            int c = 0;
            if(mValues.Length != inputs.Count * outputs.Count)
            {
                return false;
            }
            foreach(InputNeuron i in inputs)
            {
                foreach(OutputNeuron o in outputs)
                {
                    i.addLink(new Link(i, o, mValues[c], rnd.Next(0, 3)));
                    c++;
                }
            }
            return true;
        }

        public void resetOutputValue()
        {
            foreach (OutputNeuron o in outputs)
            {
                o.resetValue();
            }
        }
    }
}


Quellcode ausblenden C#-Code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NeuronalNetwork
{
    class OutputNeuron
    {
        private float outputValue;

        public OutputNeuron()
        {
            this.outputValue = 0;
        }

        public void setOutputValue(float v)
        {
            outputValue += v;

        }

        public void resetValue()
        {
            outputValue = 0;
        }

        public float getOutputValue()
        {
            return outputValue;
        }
    }
}


Quellcode ausblenden C#-Code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace TicTacToe
{
    static class Program
    {
        /// <summary>
        /// Der Haupteinstiegspunkt für die Anwendung.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
    }
}

Kommentare:

hollst

Punkte: 13980

761 Aufgaben
132 Lösungen
117 Kommentare

#1
23.01.2018 um 14:09 Uhr
Hallo, bitte noch den File

Form1Designer.cs

hinzufügen oder wenigsten einen Screenshot,
sonst nützt einem das wenig.

Gruß hollst
post_arrow
516 0

Z3RP

Punkte: 1020

1 Aufgaben
15 Lösungen
6 Kommentare

#2
13.02.2018 um 10:51 Uhr
Hier ist nochmal der Designer:

Quellcode ausblenden C#-Code
namespace TicTacToe
{
    partial class Form1
    {
        /// <summary>
        /// Erforderliche Designervariable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Verwendete Ressourcen bereinigen.
        /// </summary>
        /// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Vom Windows Form-Designer generierter Code

        /// <summary>
        /// Erforderliche Methode für die Designerunterstützung.
        /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
        /// </summary>
        private void InitializeComponent()
        {
            this.pictureBox1 = new System.Windows.Forms.PictureBox();
            this.pictureBox2 = new System.Windows.Forms.PictureBox();
            this.pictureBox3 = new System.Windows.Forms.PictureBox();
            this.pictureBox4 = new System.Windows.Forms.PictureBox();
            this.pictureBox5 = new System.Windows.Forms.PictureBox();
            this.pictureBox6 = new System.Windows.Forms.PictureBox();
            this.pictureBox7 = new System.Windows.Forms.PictureBox();
            this.pictureBox8 = new System.Windows.Forms.PictureBox();
            this.pictureBox9 = new System.Windows.Forms.PictureBox();
            this.panel1 = new System.Windows.Forms.Panel();
            this.button1 = new System.Windows.Forms.Button();
            this.label1 = new System.Windows.Forms.Label();
            this.pictureBox10 = new System.Windows.Forms.PictureBox();
            this.loadBot = new System.Windows.Forms.Button();
            this.newBot = new System.Windows.Forms.Button();
            this.label2 = new System.Windows.Forms.Label();
            this.saveBot = new System.Windows.Forms.Button();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).BeginInit();
            this.panel1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox10)).BeginInit();
            this.SuspendLayout();
            // 
            // pictureBox1
            // 
            this.pictureBox1.BackColor = System.Drawing.SystemColors.Control;
            this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.pictureBox1.Location = new System.Drawing.Point(140, 104);
            this.pictureBox1.Name = "pictureBox1";
            this.pictureBox1.Size = new System.Drawing.Size(60, 60);
            this.pictureBox1.TabIndex = 0;
            this.pictureBox1.TabStop = false;
            this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
            // 
            // pictureBox2
            // 
            this.pictureBox2.BackColor = System.Drawing.SystemColors.Control;
            this.pictureBox2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.pictureBox2.Location = new System.Drawing.Point(206, 104);
            this.pictureBox2.Name = "pictureBox2";
            this.pictureBox2.Size = new System.Drawing.Size(60, 60);
            this.pictureBox2.TabIndex = 1;
            this.pictureBox2.TabStop = false;
            this.pictureBox2.Click += new System.EventHandler(this.pictureBox2_Click);
            // 
            // pictureBox3
            // 
            this.pictureBox3.BackColor = System.Drawing.SystemColors.Control;
            this.pictureBox3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.pictureBox3.Location = new System.Drawing.Point(272, 104);
            this.pictureBox3.Name = "pictureBox3";
            this.pictureBox3.Size = new System.Drawing.Size(60, 60);
            this.pictureBox3.TabIndex = 2;
            this.pictureBox3.TabStop = false;
            this.pictureBox3.Click += new System.EventHandler(this.pictureBox3_Click);
            // 
            // pictureBox4
            // 
            this.pictureBox4.BackColor = System.Drawing.SystemColors.Control;
            this.pictureBox4.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.pictureBox4.Location = new System.Drawing.Point(140, 170);
            this.pictureBox4.Name = "pictureBox4";
            this.pictureBox4.Size = new System.Drawing.Size(60, 60);
            this.pictureBox4.TabIndex = 5;
            this.pictureBox4.TabStop = false;
            this.pictureBox4.Click += new System.EventHandler(this.pictureBox4_Click);
            // 
            // pictureBox5
            // 
            this.pictureBox5.BackColor = System.Drawing.SystemColors.Control;
            this.pictureBox5.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.pictureBox5.Location = new System.Drawing.Point(206, 170);
            this.pictureBox5.Name = "pictureBox5";
            this.pictureBox5.Size = new System.Drawing.Size(60, 60);
            this.pictureBox5.TabIndex = 4;
            this.pictureBox5.TabStop = false;
            this.pictureBox5.Click += new System.EventHandler(this.pictureBox5_Click);
            // 
            // pictureBox6
            // 
            this.pictureBox6.BackColor = System.Drawing.SystemColors.Control;
            this.pictureBox6.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.pictureBox6.Location = new System.Drawing.Point(272, 170);
            this.pictureBox6.Name = "pictureBox6";
            this.pictureBox6.Size = new System.Drawing.Size(60, 60);
            this.pictureBox6.TabIndex = 3;
            this.pictureBox6.TabStop = false;
            this.pictureBox6.Click += new System.EventHandler(this.pictureBox6_Click);
            // 
            // pictureBox7
            // 
            this.pictureBox7.BackColor = System.Drawing.SystemColors.Control;
            this.pictureBox7.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.pictureBox7.Location = new System.Drawing.Point(-1, 132);
            this.pictureBox7.Name = "pictureBox7";
            this.pictureBox7.Size = new System.Drawing.Size(60, 60);
            this.pictureBox7.TabIndex = 8;
            this.pictureBox7.TabStop = false;
            this.pictureBox7.Click += new System.EventHandler(this.pictureBox7_Click);
            // 
            // pictureBox8
            // 
            this.pictureBox8.BackColor = System.Drawing.SystemColors.Control;
            this.pictureBox8.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.pictureBox8.Location = new System.Drawing.Point(65, 132);
            this.pictureBox8.Name = "pictureBox8";
            this.pictureBox8.Size = new System.Drawing.Size(60, 60);
            this.pictureBox8.TabIndex = 7;
            this.pictureBox8.TabStop = false;
            this.pictureBox8.Click += new System.EventHandler(this.pictureBox8_Click);
            // 
            // pictureBox9
            // 
            this.pictureBox9.BackColor = System.Drawing.SystemColors.Control;
            this.pictureBox9.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.pictureBox9.Location = new System.Drawing.Point(272, 236);
            this.pictureBox9.Name = "pictureBox9";
            this.pictureBox9.Size = new System.Drawing.Size(60, 60);
            this.pictureBox9.TabIndex = 6;
            this.pictureBox9.TabStop = false;
            this.pictureBox9.Click += new System.EventHandler(this.pictureBox9_Click);
            // 
            // panel1
            // 
            this.panel1.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
            this.panel1.Controls.Add(this.pictureBox8);
            this.panel1.Controls.Add(this.pictureBox7);
            this.panel1.Location = new System.Drawing.Point(141, 104);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(191, 192);
            this.panel1.TabIndex = 9;
            // 
            // button1
            // 
            this.button1.Location = new System.Drawing.Point(191, 355);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(75, 23);
            this.button1.TabIndex = 10;
            this.button1.Text = "Reset";
            this.button1.UseVisualStyleBackColor = true;
            this.button1.Click += new System.EventHandler(this.button1_Click);
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(220, 46);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(13, 13);
            this.label1.TabIndex = 11;
            this.label1.Text = "_";
            // 
            // pictureBox10
            // 
            this.pictureBox10.BackColor = System.Drawing.SystemColors.Control;
            this.pictureBox10.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.pictureBox10.Location = new System.Drawing.Point(196, 46);
            this.pictureBox10.Name = "pictureBox10";
            this.pictureBox10.Size = new System.Drawing.Size(18, 20);
            this.pictureBox10.TabIndex = 12;
            this.pictureBox10.TabStop = false;
            // 
            // loadBot
            // 
            this.loadBot.Location = new System.Drawing.Point(272, 355);
            this.loadBot.Name = "loadBot";
            this.loadBot.Size = new System.Drawing.Size(75, 23);
            this.loadBot.TabIndex = 14;
            this.loadBot.Text = "Load Bot";
            this.loadBot.UseVisualStyleBackColor = true;
            this.loadBot.Click += new System.EventHandler(this.loadBot_Click);
            // 
            // newBot
            // 
            this.newBot.Location = new System.Drawing.Point(434, 355);
            this.newBot.Name = "newBot";
            this.newBot.Size = new System.Drawing.Size(75, 23);
            this.newBot.TabIndex = 15;
            this.newBot.Text = "New Bot";
            this.newBot.UseVisualStyleBackColor = true;
            this.newBot.Click += new System.EventHandler(this.newBot_Click);
            // 
            // label2
            // 
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(280, 381);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(10, 13);
            this.label2.TabIndex = 16;
            this.label2.Text = ".";
            // 
            // saveBot
            // 
            this.saveBot.Location = new System.Drawing.Point(353, 355);
            this.saveBot.Name = "saveBot";
            this.saveBot.Size = new System.Drawing.Size(75, 23);
            this.saveBot.TabIndex = 13;
            this.saveBot.Text = "Save Bot";
            this.saveBot.UseVisualStyleBackColor = true;
            this.saveBot.Click += new System.EventHandler(this.saveBot_Click);
            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(622, 433);
            this.Controls.Add(this.label2);
            this.Controls.Add(this.newBot);
            this.Controls.Add(this.loadBot);
            this.Controls.Add(this.saveBot);
            this.Controls.Add(this.pictureBox10);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.button1);
            this.Controls.Add(this.pictureBox4);
            this.Controls.Add(this.pictureBox5);
            this.Controls.Add(this.pictureBox6);
            this.Controls.Add(this.pictureBox3);
            this.Controls.Add(this.pictureBox2);
            this.Controls.Add(this.pictureBox1);
            this.Controls.Add(this.pictureBox9);
            this.Controls.Add(this.panel1);
            this.Name = "Form1";
            this.Text = "Form1";
            this.Load += new System.EventHandler(this.Form1_Load);
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox9)).EndInit();
            this.panel1.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox10)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.PictureBox pictureBox1;
        private System.Windows.Forms.PictureBox pictureBox2;
        private System.Windows.Forms.PictureBox pictureBox3;
        private System.Windows.Forms.PictureBox pictureBox4;
        private System.Windows.Forms.PictureBox pictureBox5;
        private System.Windows.Forms.PictureBox pictureBox6;
        private System.Windows.Forms.PictureBox pictureBox7;
        private System.Windows.Forms.PictureBox pictureBox8;
        private System.Windows.Forms.PictureBox pictureBox9;
        private System.Windows.Forms.Panel panel1;
        private System.Windows.Forms.Button button1;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.PictureBox pictureBox10;
        private System.Windows.Forms.Button loadBot;
        private System.Windows.Forms.Button newBot;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.Button saveBot;
    }
}



post_arrow
519 0

hollst

Punkte: 13980

761 Aufgaben
132 Lösungen
117 Kommentare

#3
14.02.2018 um 13:36 Uhr
hallo,

wozu ist

saveBot_Click

gut??
post_arrow
520 0

Z3RP

Punkte: 1020

1 Aufgaben
15 Lösungen
6 Kommentare

#4
31.05.2018 um 09:10 Uhr
Das war dafür gedacht um das Neuronale Netzt / Bot abzuspeichern damit man ihn, falls er gut ist, wieder laden kann :)
post_arrow
534 0
Bitte melden Sie sich an um eine Kommentar zu schreiben.
Kommentar schreiben