Example Code

Othello, an XControl Example

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

Overview

This example, while developed for entertainment, shows how to build and implement an XControl.  In this example, the Othello Board is the XControl and contains the basic functionality of the code.


Description

This example implements the classic game Othello with LabVIEW simulating the 2nd player.  To implement the game, an XControl was built to perform both the player's and computer's moves.  Most of the playing functionality is implemented in the "Facade.vi" ability of the XControl.


Requirements: LabVIEW 2012 (or compatible), Hardware: none.


Steps to Implement or Execute Code

  1. Download and extract all files
  2. Open Othello.lvproj
  3. Open "Demo.vi" and click run to start the game.

Additional Information or References: 

 

Othelo.PNG

 

For more detailed information about the performance of this XControl, visit http://ruanqizhen.spaces.live.com/blog/cns!5852D4F797C53FB6!3382.entry


**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
Smootastic
NI Employee (retired)
on

For anyone downloading this file, the .7z extension requires 7-Zip, a freeware compression program.