#include "vision.h"

#include <bits/stdc++.h>

using namespace std;

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

int getMove1d(std::vector<int> v)
{
    if(v.size() == 3) {
        int a = v[0], b = v[2];
        int ai = 0, bi = 2;

        if(a > b) {
            swap(a, b);
            swap(ai, bi);
        }

        if(a == 1 && b == 2) {
            return bi;
        } else if(a == 1 && b == 3) {
            return ai;
        } else {
            return bi;
        }
    } else if(v.size() == 5) {
        return v[4] == 3 ? 4 : 0;
    } else {
        return v[6] == 2 ? 6 : 5;
    }
}

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

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