資源簡(jiǎn)介
六子棋,是由臺(tái)灣交通大學(xué)吳毅成教授所發(fā)明的一種游戲,由五子棋改良而來,相比較而言,它具有規(guī)則簡(jiǎn)單、變化復(fù)雜、游戲公平三個(gè)很好的特性。在六子棋里,除了持黑的第一手下一子外,黑白雙方輪流各下兩子,最后連成六子者勝。
代碼片段和文件信息
#include?
#include?
#include?
//#include?
#include?
#include?
#include?
#include?
#include?
#include?
using?namespace?std;
enum?paint_char{black=1white=2empty=-1nempty=-2side=3sum=3};
enum?vertion{playercomputer};
const?int?chessbored_size=21;//棋盤尺寸?
int?chessbored[chessbored_size][chessbored_size];//棋盤?
int?cursor_xcursor_y;//光標(biāo)坐標(biāo)?
int?player_color=black;//玩家棋子顏色
int?computer_color=white;?//電腦棋子顏色?
const?int?max2=2147483647fen_max=99999999;
const?int?min2=-2147483647fen_min=-99999999;
int?wide=4depth=6;//搜索的深度和廣度?
int?regret_array[180][chessbored_size][chessbored_size]regret_num;//悔棋記錄數(shù)組
struct?node
{
int?ij;
int?value;
int?c[2][4];//各方向形成的連接的子數(shù)?
friend?bool?operator?(node?anod
評(píng)論
共有 條評(píng)論