找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 3452|回復(fù): 2
打印 上一主題 下一主題
收起左側(cè)

LabVIEW黑白棋程序

[復(fù)制鏈接]
跳轉(zhuǎn)到指定樓層
樓主
ID:538312 發(fā)表于 2019-5-14 20:38 | 只看該作者 |只看大圖 回帖獎勵 |倒序瀏覽 |閱讀模式
今天因為工作需要,察看了我原來備份的一些文件。
結(jié)果我翻出來了好多已經(jīng)被我遺忘了的東西,都拿來跟大家分享吧,也作為一個紀(jì)念。

先分享一個 LabVIEW 下黑白棋的程序。這不是我說過的使用遺傳算法的那個程序。
這是我剛開始學(xué)習(xí) LabVIEW 時編寫的程序。那時還是1999年,使用的是LabVIEW 5.1。
程序里基本只有界面,沒有實現(xiàn)什么算法。

程序在LabVIEW 5.1上開發(fā)之后,我再也沒有再維護(hù)過。我今天在LabVIEW 8.1 上試著打開它,發(fā)現(xiàn)以前所使用的一些庫VI已經(jīng)找不到了,不過只影響到了Othello server.vi。其他VI還可以正常運行。


解開zip包:
Othello.vi             是在本機(jī)兩人對戰(zhàn)的主VI
Othello auto.vi   或 Othello super.vi  是人機(jī)對戰(zhàn)的主VI
Othello server.vi   是在局域網(wǎng)兩人對戰(zhàn)的服務(wù)端VI
Othello client.vi   是在局域網(wǎng)兩人對戰(zhàn)的客戶端VI


單片機(jī)源程序如下:
  1. // Othello.cpp : Defines the entry point for the console application.
  2. //

  3. #include "stdio.h"
  4. #include "stdlib.h"
  5. #include "CheckStatus.h"
  6. #include "TurnOver.h"
  7. #include "AutoPutOneChess.h"


  8. int GetNewChessPosition(int thePositionArrary[8][8], int chessColor,
  9.                                                  int step, int *autoRow, int *autoColumn)
  10. {   rand();
  11.         if ((step)<54)
  12.                 Auto_Put_Chess(thePositionArrary, chessColor, 7, autoRow, autoColumn);
  13.         else
  14.                 Auto_Put_Chess(thePositionArrary, chessColor, 64-(step), autoRow, autoColumn);
  15.         return(0);
  16. }
復(fù)制代碼

所有資料51hei提供下載:
黑白棋程序.zip (518.59 KB, 下載次數(shù): 11)



評分

參與人數(shù) 1黑幣 +50 收起 理由
admin + 50 共享資料的黑幣獎勵!

查看全部評分

分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享淘帖 頂 踩
回復(fù)

使用道具 舉報

沙發(fā)
ID:328014 發(fā)表于 2019-5-17 05:28 | 只看該作者
好資料,51黑有你更精彩!!!
回復(fù)

使用道具 舉報

板凳
ID:320935 發(fā)表于 2019-5-20 15:23 | 只看該作者

好資料,51黑有你更精彩!!!
回復(fù)

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規(guī)則

手機(jī)版|小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術(shù)交流QQ群281945664

Powered by 單片機(jī)教程網(wǎng)

快速回復(fù) 返回頂部 返回列表