module Drasil.GamePhysics.Assumptions where

import Language.Drasil hiding (organization)

import Data.Drasil.Concepts.Documentation as Doc (simulation, assumpDom)
import qualified Data.Drasil.Concepts.Physics as CP (collision, damping, force,
  friction, joint, rigidBody)
import qualified Data.Drasil.Concepts.Math as CM (cartesian, constraint, rightHand)

import Drasil.GamePhysics.Concepts (twoD)

assumptions :: [ConceptInstance]
assumptions :: [ConceptInstance]
assumptions = [ConceptInstance
assumpOT, ConceptInstance
assumpOD, ConceptInstance
assumpCST, ConceptInstance
assumpAD, ConceptInstance
assumpCT, ConceptInstance
assumpDI,
  ConceptInstance
assumpCAJI]

assumpOT, assumpOD, assumpCST, assumpAD, assumpCT, assumpDI,
  assumpCAJI :: ConceptInstance
assumpOT :: ConceptInstance
assumpOT = String -> Sentence -> String -> ConceptChunk -> ConceptInstance
forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic String
"assumpOT" ([Sentence] -> Sentence
foldlSent [Sentence]
assumpOTDesc) String
"objectTy" ConceptChunk
assumpDom
assumpOD :: ConceptInstance
assumpOD = String -> Sentence -> String -> ConceptChunk -> ConceptInstance
forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic String
"assumpOD" ([Sentence] -> Sentence
foldlSent [Sentence]
assumpODDesc) String
"objectDimension" ConceptChunk
assumpDom
assumpCST :: ConceptInstance
assumpCST = String -> Sentence -> String -> ConceptChunk -> ConceptInstance
forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic String
"assumpCST" ([Sentence] -> Sentence
foldlSent [Sentence]
assumpCSTDesc) String
"coordinateSystemTy" ConceptChunk
assumpDom
assumpAD :: ConceptInstance
assumpAD = String -> Sentence -> String -> ConceptChunk -> ConceptInstance
forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic String
"assumpAD" ([Sentence] -> Sentence
foldlSent [Sentence]
assumpADDesc) String
"axesDefined" ConceptChunk
assumpDom
assumpCT :: ConceptInstance
assumpCT = String -> Sentence -> String -> ConceptChunk -> ConceptInstance
forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic String
"assumpCT" ([Sentence] -> Sentence
foldlSent [Sentence]
assumpCTDesc) String
"collisionType" ConceptChunk
assumpDom
assumpDI :: ConceptInstance
assumpDI = String -> Sentence -> String -> ConceptChunk -> ConceptInstance
forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic String
"assumpDI" ([Sentence] -> Sentence
foldlSent [Sentence]
assumpDIDesc) String
"dampingInvolvement" ConceptChunk
assumpDom
assumpCAJI :: ConceptInstance
assumpCAJI = String -> Sentence -> String -> ConceptChunk -> ConceptInstance
forall c.
Concept c =>
String -> Sentence -> String -> c -> ConceptInstance
cic String
"assumpCAJI" ([Sentence] -> Sentence
foldlSent [Sentence]
assumpCAJIDesc) String
"constraintsAndJointsInvolvement" ConceptChunk
assumpDom

assumpOTDesc, assumpODDesc, assumpCSTDesc, assumpADDesc, assumpCTDesc, 
  assumpDIDesc, assumpCAJIDesc :: [Sentence]

allObject :: Sentence -> [Sentence]
allObject :: Sentence -> [Sentence]
allObject Sentence
thing = [String -> Sentence
S String
"All objects are", Sentence
thing]

thereNo :: [Sentence] -> [Sentence]
thereNo :: [Sentence] -> [Sentence]
thereNo [Sentence
x]      = [String -> Sentence
S String
"There is no", Sentence
x, String -> Sentence
S String
"involved throughout the", 
  IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase IdeaDict
simulation]
thereNo [Sentence]
l        = [String -> Sentence
S String
"There are no", SepType -> FoldType -> [Sentence] -> Sentence
foldlList SepType
Comma FoldType
List [Sentence]
l, String -> Sentence
S String
"involved throughout the", 
  IdeaDict -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase IdeaDict
simulation]

implies :: Sentence -> [Sentence]
implies :: Sentence -> [Sentence]
implies Sentence
f = [String -> Sentence
S String
"and this implies that there are no", Sentence
f] 
--not sure if defining a new function is the best way to do this,
-- as was done in the original file,but it displays correctly
--(line 52 was added for assumption6)

assumpOTDesc :: [Sentence]
assumpOTDesc = Sentence -> [Sentence]
allObject (ConceptChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
plural ConceptChunk
CP.rigidBody)
assumpODDesc :: [Sentence]
assumpODDesc = Sentence -> [Sentence]
allObject (CI -> Sentence
getAcc CI
twoD)
assumpCSTDesc :: [Sentence]
assumpCSTDesc = [String -> Sentence
S String
"The library uses a", ConceptChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
CM.cartesian]
assumpADDesc :: [Sentence]
assumpADDesc = [String -> Sentence
S String
"The axes are defined using", ConceptChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
CM.rightHand]
assumpCTDesc :: [Sentence]
assumpCTDesc = [String -> Sentence
S String
"All", ConceptChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
plural ConceptChunk
CP.rigidBody, ConceptChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
plural ConceptChunk
CP.collision,
  String -> Sentence
S String
"are vertex-to-edge", ConceptChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
plural ConceptChunk
CP.collision]

assumpDIDesc :: [Sentence]
assumpDIDesc = [Sentence] -> [Sentence]
thereNo [ConceptChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
CP.damping] [Sentence] -> [Sentence] -> [Sentence]
forall a. [a] -> [a] -> [a]
++ Sentence -> [Sentence]
implies (ConceptChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
phrase ConceptChunk
CP.friction Sentence -> Sentence -> Sentence
+:+ ConceptChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
plural ConceptChunk
CP.force)
assumpCAJIDesc :: [Sentence]
assumpCAJIDesc = [Sentence] -> [Sentence]
thereNo [ConceptChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
plural ConceptChunk
CM.constraint, ConceptChunk -> Sentence
forall n. NamedIdea n => n -> Sentence
plural ConceptChunk
CP.joint]

{-assumptions_list = enumSimple 1 (getAcc assumption) $ map (foldlSent) 
  [assumpOTDesc, assumpODDesc, assumpCSTDesc, assumpADDesc, assumpCTDesc, 
  assumpDIDesc, assumpCAJIDesc]-}

assumptionsListA :: [[Sentence]]
assumptionsListA :: [[Sentence]]
assumptionsListA = [[Sentence]
assumpOTDesc, [Sentence]
assumpODDesc, [Sentence]
assumpCSTDesc, [Sentence]
assumpADDesc,
  [Sentence]
assumpCTDesc, [Sentence]
assumpDIDesc, [Sentence]
assumpCAJIDesc]