To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example VI is a slot machine game built with LabVIEW.
Description
When Slot Main 2012 NIVerified.vi is started, the VI prompts the user for their name. If the name is found, the VI will retrieve their number of credits; if no entry is found, it will give the user 500 credits to start. Should a user run out of credits, the user can reset their number of credits to 250 by clicking the "Reset Credits" button and entering the passwork "admin".
Every time a bet is placed, the new number of credits is written to the "User Data.txt" file. If the text file does not exist (i.e. the first time the VI is run) it will make one.
How to Win: Match all three numbers and win up to 200 times what you bet
Match two numbers and win up to 15 times what you bet
If no items match you can still win back some of what you bet, or lose all of what you bet
Requirements
Steps to Implement or Execute Code
Additional Information or References
VI Front Panel
VI Block Diagram
**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.