10is_single_tap(
const unsigned& a) ->
bool
12 return (a & (a - 1)) == 0;
18is_jack_at_col(
const unsigned& columnId,
19 const unsigned& row_notes,
20 const unsigned& last_row_notes) ->
bool
22 return ((columnId & row_notes) != 0U) && ((columnId & last_row_notes) != 0U);
29is_alternating_chord_single(
const unsigned& a,
const unsigned& b) ->
bool
31 return (a > 1 && b == 1) || (a == 1 && b > 1);
37is_alternating_chord_stream(
const unsigned& a,
39 const unsigned& c) ->
bool
41 if (is_single_tap(a)) {
42 if (is_single_tap(b)) {
46 if (!is_single_tap(c)) {
50 if (!is_single_tap(b)) {
54 if (is_single_tap(c)) {
59 return static_cast<int>(((a & b) != 0U) && ((b & c) != 0U)) == 0;