noobre Posted February 6, 2018 at 03:10 PM Report #609232 Posted February 6, 2018 at 03:10 PM Olá, actualmente o meu projecto tem este aspecto. Neste momento a disposição das letras está completamente estatico como podem ver através deste código aqui: private void button2_Click(object sender, EventArgs e) { if (comboBox1.Text == "Animais") { txts[7, 3].Text = "E"; txts[7, 4].Text = "L"; txts[7, 5].Text = "E"; txts[7, 6].Text = "F"; txts[7, 7].Text = "A"; txts[7, 8].Text = "N"; txts[7, 9].Text = "T"; txts[7, 10].Text = "E"; // Elefante txts[12, 4].Text = "U"; txts[12, 5].Text = "R"; txts[12, 6].Text = "S"; txts[12, 7].Text = "O"; // Urso txts[13, 4].Text = "G"; txts[13, 5].Text = "A"; txts[13, 6].Text = "T"; txts[13, 7].Text = "O"; // Gato txts[9, 5].Text = "C"; txts[10, 5].Text = "O"; txts[11, 5].Text = "B"; txts[12, 5].Text = "R"; txts[13, 5].Text = "A"; // Cobra txts[9, 5].Text = "C"; txts[9, 6].Text = "A"; txts[9, 7].Text = "O"; // cao txts[3, 7].Text = "P"; txts[4, 7].Text = "A"; txts[5, 7].Text = "S"; txts[6, 7].Text = "S"; txts[7, 7].Text = "A"; txts[8, 7].Text = "R"; txts[9, 7].Text = "O"; // Passaro txts[3, 7].Text = "P"; txts[3, 8].Text = "A"; txts[3, 9].Text = "P"; txts[3, 10].Text = "A"; txts[3, 11].Text = "G"; txts[3, 12].Text = "A"; txts[3, 13].Text = "I"; txts[3, 14].Text = "O"; // Papagaio txts[2, 12].Text = "V"; txts[3, 12].Text = "A"; txts[4, 12].Text = "C"; txts[5, 12].Text = "A"; // Vaca txts[2, 13].Text = "G"; txts[3, 13].Text = "I"; txts[4, 13].Text = "R"; txts[5, 13].Text = "A"; txts[6, 13].Text = "F"; txts[7, 13].Text = "A"; // Girafa txts[3, 14].Text = "O"; txts[4, 14].Text = "V"; txts[5, 14].Text = "E"; txts[6, 14].Text = "L"; txts[7, 14].Text = "H"; txts[8, 14].Text = "A"; } } // Função preencher o tabuleiro Contudo gostaria de tornar a disposição das palavras dinamicamente no tabuleiro, já andei de volta da internet e não acho nada que me consiga ajudar neste problema. Ou seja, gostaria que no tabuleiro de 16x16 que as palavras fossem dispostas dinamicamente todas ligadas, uma letra entre elas. Vou disponibilizar aqui o código todo caso queiram ajudar! https://pastebin.com/JgJQS02a Muito obrigado e espero aguardar resposta, Pedro Nobre
iron Posted February 7, 2018 at 01:53 PM Report #609251 Posted February 7, 2018 at 01:53 PM Pelo que percebi, deves querer algo como uma árvore n-ária. Cumprimentos, iron
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now