今天因為工作需要,察看了我原來備份的一些文件。
結果我翻出來了好多已經被我遺忘了的東西,都拿來跟大家分享吧,也作為一個紀念。
先分享一個 LabVIEW 下黑白棋的程序。這不是我說過的使用遺傳算法的那個程序。
這是我剛開始學習 LabVIEW 時編寫的程序。那時還是1999年,使用的是LabVIEW 5.1。
程序里基本只有界面,沒有實現什么算法。
程序在LabVIEW 5.1上開發之后,我再也沒有再維護過。我今天在LabVIEW 8.1 上試著打開它,發現以前所使用的一些庫VI已經找不到了,不過只影響到了Othello server.vi。其他VI還可以正常運行。
解開zip包:
Othello.vi 是在本機兩人對戰的主VI
Othello auto.vi 或 Othello super.vi 是人機對戰的主VI
Othello server.vi 是在局域網兩人對戰的服務端VI
Othello client.vi 是在局域網兩人對戰的客戶端VI
單片機源程序如下:
- // Othello.cpp : Defines the entry point for the console application.
- //
- #include "stdio.h"
- #include "stdlib.h"
- #include "CheckStatus.h"
- #include "TurnOver.h"
- #include "AutoPutOneChess.h"
- int GetNewChessPosition(int thePositionArrary[8][8], int chessColor,
- int step, int *autoRow, int *autoColumn)
- { rand();
- if ((step)<54)
- Auto_Put_Chess(thePositionArrary, chessColor, 7, autoRow, autoColumn);
- else
- Auto_Put_Chess(thePositionArrary, chessColor, 64-(step), autoRow, autoColumn);
- return(0);
- }
復制代碼
所有資料51hei提供下載:
黑白棋程序.zip
(518.59 KB, 下載次數: 11)
2019-5-14 20:37 上傳
點擊文件名下載附件
|