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 = String -> Sentence -> String -> ConceptChunk -> ConceptInstance
forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic String
"linearGS" ([QuantityDict] -> Sentence -> Sentence -> Sentence
forall a. NamedIdea a => [a] -> Sentence -> Sentence -> Sentence
goalStatementStruct (Int -> [QuantityDict] -> [QuantityDict]
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 = String -> Sentence -> String -> ConceptChunk -> ConceptInstance
forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic String
"angularGS" ([QuantityDict] -> Sentence -> Sentence -> Sentence
forall a. NamedIdea a => [a] -> Sentence -> Sentence -> Sentence
goalStatementStruct (Int -> [QuantityDict] -> [QuantityDict]
forall a. Int -> [a] -> [a]
drop Int
3 ([QuantityDict] -> [QuantityDict])
-> [QuantityDict] -> [QuantityDict]
forall a b. (a -> b) -> a -> b
$ Int -> [QuantityDict] -> [QuantityDict]
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",
  ConceptChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
time, Sentence
condition2]
  where listOfOutputs :: Sentence
listOfOutputs       = SepType -> FoldType -> [Sentence] -> Sentence
foldlList SepType
Comma FoldType
List ([Sentence] -> Sentence) -> [Sentence] -> Sentence
forall a b. (a -> b) -> a -> b
$ (a -> Sentence) -> [a] -> [Sentence]
forall a b. (a -> b) -> [a] -> [b]
map a -> Sentence
forall n. NamedIdea n => n -> Sentence
plural [a]
outputs