blob: 52c37aed6fc41aa17f55c44e49298aed118c66ed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#pragma once
#include <iostream>
#include "params.h"
using namespace std;
#define NEXTTURN(_clr) ((_clr) % NC + 1)
struct Idx {
inline Idx(int idx) : x(idx % BSZ - BMID), y(idx / BSZ - BMID) {}
int x, y;
};
inline ostream& operator<<(ostream &os, const Idx &obj) {
return os << '(' << obj.x << ',' << obj.y << ')';
}
|