module Drasil.GamePhysics.Goals (goals, linearGS, angularGS) where

import Language.Drasil

import Data.Drasil.Concepts.Documentation (goalStmtDom)
import Data.Drasil.Concepts.Physics (time)

import Drasil.GamePhysics.Unitals (inputSymbols, outputSymbols)

goals :: [ConceptInstance]
goals :: [ConceptInstance]
goals = [ConceptInstance
linearGS, ConceptInstance
angularGS]

linearGS :: ConceptInstance
linearGS :: ConceptInstance
linearGS = forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic String
"linearGS" (forall a. NamedIdea a => [a] -> Sentence -> Sentence -> Sentence
goalStatementStruct (forall a. Int -> [a] -> [a]
take Int
2 [QuantityDict]
outputSymbols)
  (String -> Sentence
S String
"their new") Sentence
EmptyS) String
"Determine-Linear-Properties" ConceptChunk
goalStmtDom

angularGS :: ConceptInstance
angularGS :: ConceptInstance
angularGS = forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic String
"angularGS" (forall a. NamedIdea a => [a] -> Sentence -> Sentence -> Sentence
goalStatementStruct (forall a. Int -> [a] -> [a]
drop Int
3 forall a b. (a -> b) -> a -> b
$ forall a. Int -> [a] -> [a]
take Int
5 [QuantityDict]
inputSymbols)
  (String -> Sentence
S String
"their new") Sentence
EmptyS) String
"Determine-Angular-Properties" ConceptChunk
goalStmtDom

goalStatementStruct :: (NamedIdea a) => [a] -> Sentence -> Sentence -> Sentence
goalStatementStruct :: forall a. NamedIdea a => [a] -> Sentence -> Sentence -> Sentence
goalStatementStruct [a]
outputs Sentence
condition1 Sentence
condition2 = [Sentence] -> Sentence
foldlSent
  [ String -> Sentence
S String
"Determine", Sentence
condition1, Sentence
listOfOutputs, String -> Sentence
S String
"over a period of",
  forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
time, Sentence
condition2]
  where listOfOutputs :: Sentence
listOfOutputs       = SepType -> FoldType -> [Sentence] -> Sentence
foldlList SepType
Comma FoldType
List forall a b. (a -> b) -> a -> b
$ forall a b. (a -> b) -> [a] -> [b]
map forall n. NamedIdea n => n -> Sentence
plural [a]
outputs