Example Code

Genius - Game using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Download All

Overview
This VI demonstrates the famous game-Genius.

 

Description
Here is a brief description of the example:

This example code shows how to program the famous game. There are two stages. The first stage is that the computer will light the different color LEDS by the certain order, and then the player can press the related LEDS according to the computer’s order in the second stage. Finally, you can get the high score.

Note: the times of lighting LEDs is increased step by step.

 

Requirements

  1. LabVIEW 2013 (or compatible)


Steps to Implement or Execute Code

  1. Start the game
  2. Firstly, the computer will light the LEDS according to the certain order
  3. Then, it's player's turn to press the button according to the shining order by computer.
  4. If the wrong button is pressed, the game is over
  5. You can get score when pressing correct button

 

Additional Information or References

VI Snippet

Genius 2013 NIVerified.png

 **This document has been updated to meet the current required format for the NI Code Exchange.**

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
NJKirchner
Active Participant
Active Participant
on

Very clever.

I would like to see how you would re-code it without the excessive usage of local variables.