module Rattletrap.Encode.GameModeAttribute
  ( putGameModeAttribute
  )
where

import Rattletrap.Type.GameModeAttribute

import qualified Data.Binary.Bits.Put as BinaryBits

putGameModeAttribute :: GameModeAttribute -> BinaryBits.BitPut ()
putGameModeAttribute :: GameModeAttribute -> BitPut ()
putGameModeAttribute GameModeAttribute
gameModeAttribute = do
  let numBits :: Int
numBits = GameModeAttribute -> Int
gameModeAttributeNumBits GameModeAttribute
gameModeAttribute
  let word :: Word8
word = GameModeAttribute -> Word8
gameModeAttributeWord GameModeAttribute
gameModeAttribute
  Int -> Word8 -> BitPut ()
BinaryBits.putWord8 Int
numBits Word8
word