{-# LANGUAGE TemplateHaskell #-}

module Rattletrap.Type.GameModeAttribute
  ( GameModeAttribute(..)
  )
where

import Rattletrap.Type.Common

data GameModeAttribute = GameModeAttribute
  { GameModeAttribute -> Int
gameModeAttributeNumBits :: Int
  -- ^ This field is guaranteed to be small. In other words, it won't overflow.
  -- It's stored as a regular 'Int' rather than something more precise like an
  -- 'Int8' because it just gets passed to functions that expect 'Int's.
  -- There's no reason to do a bunch of conversions.
  , GameModeAttribute -> Word8
gameModeAttributeWord :: Word8
  } deriving (GameModeAttribute -> GameModeAttribute -> Bool
(GameModeAttribute -> GameModeAttribute -> Bool)
-> (GameModeAttribute -> GameModeAttribute -> Bool)
-> Eq GameModeAttribute
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GameModeAttribute -> GameModeAttribute -> Bool
$c/= :: GameModeAttribute -> GameModeAttribute -> Bool
== :: GameModeAttribute -> GameModeAttribute -> Bool
$c== :: GameModeAttribute -> GameModeAttribute -> Bool
Eq, Eq GameModeAttribute
Eq GameModeAttribute
-> (GameModeAttribute -> GameModeAttribute -> Ordering)
-> (GameModeAttribute -> GameModeAttribute -> Bool)
-> (GameModeAttribute -> GameModeAttribute -> Bool)
-> (GameModeAttribute -> GameModeAttribute -> Bool)
-> (GameModeAttribute -> GameModeAttribute -> Bool)
-> (GameModeAttribute -> GameModeAttribute -> GameModeAttribute)
-> (GameModeAttribute -> GameModeAttribute -> GameModeAttribute)
-> Ord GameModeAttribute
GameModeAttribute -> GameModeAttribute -> Bool
GameModeAttribute -> GameModeAttribute -> Ordering
GameModeAttribute -> GameModeAttribute -> GameModeAttribute
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: GameModeAttribute -> GameModeAttribute -> GameModeAttribute
$cmin :: GameModeAttribute -> GameModeAttribute -> GameModeAttribute
max :: GameModeAttribute -> GameModeAttribute -> GameModeAttribute
$cmax :: GameModeAttribute -> GameModeAttribute -> GameModeAttribute
>= :: GameModeAttribute -> GameModeAttribute -> Bool
$c>= :: GameModeAttribute -> GameModeAttribute -> Bool
> :: GameModeAttribute -> GameModeAttribute -> Bool
$c> :: GameModeAttribute -> GameModeAttribute -> Bool
<= :: GameModeAttribute -> GameModeAttribute -> Bool
$c<= :: GameModeAttribute -> GameModeAttribute -> Bool
< :: GameModeAttribute -> GameModeAttribute -> Bool
$c< :: GameModeAttribute -> GameModeAttribute -> Bool
compare :: GameModeAttribute -> GameModeAttribute -> Ordering
$ccompare :: GameModeAttribute -> GameModeAttribute -> Ordering
$cp1Ord :: Eq GameModeAttribute
Ord, Int -> GameModeAttribute -> ShowS
[GameModeAttribute] -> ShowS
GameModeAttribute -> String
(Int -> GameModeAttribute -> ShowS)
-> (GameModeAttribute -> String)
-> ([GameModeAttribute] -> ShowS)
-> Show GameModeAttribute
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GameModeAttribute] -> ShowS
$cshowList :: [GameModeAttribute] -> ShowS
show :: GameModeAttribute -> String
$cshow :: GameModeAttribute -> String
showsPrec :: Int -> GameModeAttribute -> ShowS
$cshowsPrec :: Int -> GameModeAttribute -> ShowS
Show)

$(deriveJson ''GameModeAttribute)