05-22-2026 11:38 AM
Bonjour, je programme un jeu sur labview qui est un morpion suprême 9 morpions, le but du jeu est le suivant: quand un joueur joue dans une case X, le joueur adversaire doit jouer dans le morpion X ... le premier à aligner 3 symboles dans n'importe lequel des morpions gagne.
Ma question est la suivante, je veux que lorsque c'est le tour d'un joueur, le morpion 3x3 dans lequel il doit jouer s'allume et quand le joueur click dedans il s'éteigne et le joueur adversaire joue dans son morpion allumé.
Pour cela j'ai essayé de prendre des booléens led (9) que j'ai mis sur mes 9 grand morpions . et j'ai créer un build array des 9 booléens en locale variable que j'envoie dans une boucle for et je compare les coordonnées que j'envoie à mon adversaires ( exemple il doit jouer dans le morpions 4 ) avec le "i" de la boucle for si c'est true alors il faut éclairer le morpion 4 et quand il aura jouer l'éteindre après .
Je ne parviens pas à savoir comment faire pour que le TRUE s'applique au morpion voulu et que celui ci s'éteigne après ?
Enfin c'est peut etre évident mais comme c'est des led booléennes, elles sont au dessus de mes décorations et de mon quadrillages donc je veux les passer derrière pour que le morpions s'allulmes juste par derrière.
Voila mes questions, merci pour retour si quelqu'un sait comment faire 🙂
Solved! Go to Solution.
05-22-2026 01:28 PM
Attaching your simple VI would describe much better what you are doing and where the problems are. Words alone are too ambiguous in any language.
In any case, I would recommend an array of picture rings. For some ideas, have a look at my old 4x4 version.
05-23-2026 02:19 AM
Bonjour, voila des images de mon labview, ce que j'essaye de faire donc, c'est deja mettre les leds carrées en arrière plan de mon quadrillage de jeu pour que il s'éclaire par dessous. et enfin je ne vois pas comment relier mon test d'égalité dans la boucle for, à ma variable locale concernée pour qu'elle s'allume et une fois le joueur ayant clické dedans, et que elle s'éteigne après. ( les booléens à droite je ne sais pas trop quoi en faire car j'en ai pas besoin normalement je ne vois pas à quoi les relier).
Merci d'avance !
05-23-2026 02:37 AM
J'ai mis en pièce jointe le serveur.vi pour jouer ( je n'ai pas encore fais de conditions de victoires) pour gagner il faut 3 pions alignés dans 1 des 9 morpions, ca me parait assez compliqué à faire.
Le serveur test.vi est celui ou j'essaye de faire allumé le quadrillage ou le joueur doit jouer.
05-23-2026 11:17 AM
Many here cannot open code saved in LabVIEW 2025. Please do a "save for previous" (LabVIEW 2020 or below).
05-24-2026 02:28 AM
Bonjour, voici mon programme enregistré sous différentes versions.
J'ai enregistré le test de la version 2018 à 2021 et le serveur classique, la version 2020 et 2019
05-24-2026 10:14 AM - edited 05-24-2026 10:29 AM
It is very confusing to attach VIs that have different versions, but having the same name. How can we tell what's what?
(If I do a "download all", I only get one each and the version is random).
Sorry, my monitor is not really big enough to debug that oversized code. What is the difference between serveur and serveur_test?
Why are two of the booleans in serveur_test controls while most are indicators? How are we supposed to run and operate it and what should happen? It would seem much simpler to use a 2D array of booleans (you can make the container transparent!). 9x less places for bugs to hide. Most of your outer sequence structures have no purpose at all.
What's on the other side of the TCP connection?
05-24-2026 02:25 PM
Translated from French:
Hello, I'm programming a game in LabVIEW which is a 9-piece Supreme Tic-Tac-Toe game. The goal is as follows: when a player plays in square X, the opposing player must play in Tic-Tac-Toe X... the first player to align 3 symbols in any of the Tic-Tac-Toe boards wins.
My question is this: I want to implement a visual cue so that when it is a player's turn, the specific 3x3 board where they are required to play lights up. Once the player clicks inside that board to make their move, it should turn off, and the opposing player's designated board should then light up for their turn.
To achieve this, I tried using nine Boolean LED controls, which I placed over my nine large Tic-Tac-Toe boards. I created a "Build Array" containing these nine Boolean values, stored it as a Local Variable, and passed it into a For Loop. Inside the loop, I compare the coordinates indicating the opponent's required move (for example, if they must play in board #4) against the loop's iteration index (*i*). If the condition evaluates to TRUE, the corresponding board (e.g., board #4) should light up; once the player has made their move, that board should subsequently turn off.
I am currently stuck on how to ensure that the TRUE state is applied specifically to the intended board, and—crucially—how to make that specific board turn off again *after* the player has made their move.
Finally—and this may be an obvious fix—since I am using Boolean LED controls, they currently appear *on top* of my background graphics and grid lines. I would like to send them to the back (behind the other elements) so that the "lighting up" effect appears to glow from *behind* the Tic-Tac-Toe board itself.
Thank you for providing your code. There are multiple "problems" with it that make it difficult to evaluate (unless we make some effort to "clean it up" -- the Block Diagram looks like it requires about 25 "laptop screens" in a 5-by-5 grid arrangement to fit the code you submitted. I got it down to almost fit in a single laptop screen by a combination of using the "Clean-up" tool (the "Broom" symbol on the Block Diagram Toolbar), and deleting most of the Frame Sequences (except for the pair within the While loop, which I left intact for now).
Here are some ideas to consider:
Speaking of Altenbach, have you studied his code to see how he "chooses" which square X or O has chosen on his (or her) term? [I must confess I have not studied it carefully ...]
Some suggestions that will help you in learning LabVIEW and developing clean code.
Thank you for a very entertaining "Super Tic-Tac-Toe" game idea.
Bob Schor
05-25-2026 04:42 AM
Merci à vous pour votre retour.
je vais essayer d’appliquer tous les conseils que vous m’avez donné.
je vous remercie pour votre temps!