# automatically generated by the FlatBuffers compiler, do not modify

# namespace: fbs

import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()

class ProgramState(object):
    __slots__ = ['_tab']

    # ProgramState
    def Init(self, buf, pos):
        self._tab = flatbuffers.table.Table(buf, pos)

    # ProgramState
    def Gameover(self): return self._tab.Get(flatbuffers.number_types.BoolFlags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(0))
    # ProgramState
    def Panicking(self): return self._tab.Get(flatbuffers.number_types.BoolFlags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(1))
    # ProgramState
    def Exiting(self): return self._tab.Get(flatbuffers.number_types.BoolFlags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(2))
    # ProgramState
    def InMoveloop(self): return self._tab.Get(flatbuffers.number_types.BoolFlags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(3))
    # ProgramState
    def InImpossible(self): return self._tab.Get(flatbuffers.number_types.BoolFlags, self._tab.Pos + flatbuffers.number_types.UOffsetTFlags.py_type(4))

def CreateProgramState(builder, gameover, panicking, exiting, inMoveloop, inImpossible):
    builder.Prep(1, 5)
    builder.PrependBool(inImpossible)
    builder.PrependBool(inMoveloop)
    builder.PrependBool(exiting)
    builder.PrependBool(panicking)
    builder.PrependBool(gameover)
    return builder.Offset()
