#include "vision.h"
#include <bits/stdc++.h>




std::vector<int> getVisionPattern1d(){
    return {2,2,1,2,1,1};
}


int getMove1d(std::vector<int> v){
    int p = v.size()/2;
    if (p==1){
        if (v[0] == 2) return 0; else return 2;
    }else{
        int s = 0; for (int i=0; i<5; i++) s+=v[i];
        v.push_back((1+(s%2)));
        int st = 0;
        for (int i=0; i<6; i++) if (v[i] == 2 && v[(i+1)%6]==2) st = i;
        int rg = 0;
        if (v[(st+3)%6] ==2) rg = 1;
        if (rg) return 4; else return 0;
    }
}

std::vector<std::vector<int>> getVisionPattern2d(){
    return {{1}};
}

std::pair<int, int> getMove2d(std::vector<std::vector<int>> v){
    return {0, 0};
}
