-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcommon.h
44 lines (40 loc) · 780 Bytes
/
common.h
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
42
43
44
#pragma once
#include <fstream>
#include <iostream>
#include <chrono>
#include <thread>
#include <algorithm>
#include <tuple>
#include <set>
#include <vector>
#include <string>
#include <map>
#include <unordered_map>
#include <math.h>
#include <numeric>
#include <random>
class Piece
{
public:
int piece;
int color;
int direction;
int distance;
Piece();
Piece(int piece, int color, int pos);
void getDirection();
void changeType();
int getDistance(const int &pos);
};
struct Move
{
int from;
int to;
int remove;
Move();
Move(int from, int to, int remove);
bool operator<(const Move &other) const;
};
int parseMove(const std::string ¬ation);
std::string reverseParseMove(int pos);
void printMove(const Move &move);