#pragma once

#include <cstdint>

namespace coopnet {
// 8-bit input mask carried in NetSession::InputFrame.
// Keep in sync across capture/apply on both peers.
enum Buttons : uint8_t {
    MoveLeft  = 1u << 0,
    MoveRight = 1u << 1,
    SoftDrop  = 1u << 2,
    RotCW     = 1u << 3,
    RotCCW    = 1u << 4,
    HardDrop  = 1u << 5,
    Hold      = 1u << 6,
};

inline bool has(uint8_t mask, Buttons b) {
    return (mask & static_cast<uint8_t>(b)) != 0;
}
}
