forked from silverpoetry/FreshmenC_MainProject
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
41 lines (35 loc) · 1.05 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#define Team1_Go Baseline_Go
#define Team2_Go TeamName_Go //这里换成参赛的队伍的函数名
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstdlib>
#include "state.h"
#include "Player/Baseline.h"
#include "MapManager/MapManager.h"
#include "Player/Teamname.h"
using namespace std;
int cangolist[64][2];
int main()
{
MapManger_Init();
freopen("match1.txt", "w", stdout);
printf("%s %s \n", "超级AI", "白棋队");
int currentplayer = BLACK;
MapManger_Init();
while (!MapManager_GameFinished)
{
int ret[2] = {0, 0};
int cangolength = MapManager_GetCanGoList(currentplayer, cangolist);
if (currentplayer == BLACK)
Team1_Go(BLACK, MapManager_Map, cangolist, cangolength, ret);
else
//Team1_Go(WHITE, MapManager_Map, cangolist, cangolength, ret);
Team2_Go(WHITE, MapManager_Map, ret);
currentplayer = MapManager_Step(currentplayer, ret[0], ret[1]);
}
//输出赢家
printf("%d \n", MapManager_GameWinner);
// system("pause");
return 0;
}