標題: LabVIEW黑白棋程序 [打印本頁]

作者: fdvv    時間: 2019-5-14 20:38
標題: LabVIEW黑白棋程序
今天因為工作需要,察看了我原來備份的一些文件。
結(jié)果我翻出來了好多已經(jīng)被我遺忘了的東西,都拿來跟大家分享吧,也作為一個紀念。

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

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


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


單片機源程序如下:
  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)




作者: 51hei團團    時間: 2019-5-17 05:28
好資料,51黑有你更精彩!!!
作者: woaiproteus    時間: 2019-5-20 15:23

好資料,51黑有你更精彩!!!




歡迎光臨 (http://www.torrancerestoration.com/bbs/) Powered by Discuz! X3.1