{-# LANGUAGE DeriveGeneric #-}
module Battlesnake.Core.Board where
import Battlesnake.Core.Battlesnake (Battlesnake)
import Battlesnake.Core.Coordinate (Coordinate)
import Data.Aeson (FromJSON, ToJSON)
import GHC.Generics
data Board = Board
{ Board -> Integer
height :: Integer,
Board -> Integer
width :: Integer,
Board -> [Coordinate]
food :: [Coordinate],
Board -> [Coordinate]
hazards :: [Coordinate],
Board -> [Battlesnake]
snakes :: [Battlesnake]
}
deriving (Int -> Board -> ShowS
[Board] -> ShowS
Board -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Board] -> ShowS
$cshowList :: [Board] -> ShowS
show :: Board -> String
$cshow :: Board -> String
showsPrec :: Int -> Board -> ShowS
$cshowsPrec :: Int -> Board -> ShowS
Show, forall x. Rep Board x -> Board
forall x. Board -> Rep Board x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Board x -> Board
$cfrom :: forall x. Board -> Rep Board x
Generic)
instance ToJSON Board
instance FromJSON Board