DnD-Movement-Rules / binary thing.py
binary thing.py
Raw
# cell = 0b100010110
# start = [
#     0b100110100,
#     0b000010101,
#     0b100000000,
#     0b001000000,
#     0b000001000,
#     0b010000000,
#     0b000100001,
#     0b000010101,
#     0b100010110,
# ]
# start_less_cell = [
#     0b100110100,
#     0b000010101,
#     0b100000000,
#     0b001000000,
#     0b000001000,
#     0b010000000,
#     0b000100001,
#     0b000010101,
# ]

# ans = (~0b100110100) & (~0b000010101) & (~0b000100001) & (~0b000010101) & 0b100010110
# super_ans = (
#     (~0b100110100)
#     & (~0b000010101)
#     & (~0b100000000)
#     & (~0b001000000)
#     & (~0b00000100)
#     & (~0b010000000)
#     & (~0b000100001)
#     & (~0b000010101)
#     & 0b100010110
# )

# excluder = 0b111111111
# # omega_ans = excluder
# for other in start_less_cell:
#     # for other in start_less_cell:
#     excluder &= ~other
# excluder &= cell
# pass

cell = 0b010000101
# start = [0b001001001, 0b000000010, 0b000011000, 0b011000000, 0b011010100, 0b000100000, 0b100000000, 0b010000101, 0b000001100]
start_less_cell = [0b001001001, 0b000000010, 0b000011000, 0b011000000, 0b011010100, 0b000100000, 0b100000000, 0b000001100]

excluder = 0b111111111
for other in start_less_cell:
# for other in start_less_cell:
    excluder &= ~other
excluder &= cell
pass