import Data.Either
data Options = Options
- { optHelp :: Bool
- , optColor :: Bool
- , optTimeStep :: Int
+ { optTimeStep :: Int
}
defaultOptions = Options
- { optHelp = False
- , optColor = False
- , optTimeStep = 50000
+ { optTimeStep = 50000
}
options :: [OptDescr (Options -> Options)]
options =
- [ Option ['h'] ["help"]
- (NoArg (\opts -> opts { optHelp = True }))
- "display's this message"
- , Option ['c'] ["color", "colour"]
- (NoArg (\opts -> opts { optColor = True }))
- "enables color"
- , Option ['t'] ["timestep"]
+ [ Option ['t'] ["timestep"]
(ReqArg (\t opts -> opts { optTimeStep = read t :: Int }) "timestep")
"sets the simulation time step"
]
-.TH EKITAI 1 2021-04-30
+.TH EKITAI 1 2021-05-02
.SH NAME
ekitai \- terminal fluid simulation written in haskell
.SH SYNOPSIS
.B ekitai
+[ekitai options] filename
.SH DESCRIPTION
+ekitai.hs is a terminal fluid simulator written in haskell. it is a submission to RUHacks 2021. the simulation algorithm is quite simple, it's a similar particle based one that games like 'the sandbox' and 'terraria' use.
.SH OPTIONS
+.TP
+\fB\-t\fR <\fITIMESTEP\fP>, \fB\-\-timestep=\fR\fITIMESTEP\fR
+Changes the physics timestep, default is 50000.
+.SH FILES
+ekitai reads in a file with special characters that represents simulation elements. here is a list of valid characters:
+
+#: wall block, stationary and blocks movement
+
+~: water block
+
+@: pump block, spawns water below it
+
+O: drain block, removes water around it
.SH AUTHORS
\fBekitai\fP was written by Daniel Liu
.SH REPORTING BUGS
# 液体「ekitai」
-ekitai.hs is a terminal fluid simulator written in haskell. it is a submission to RUHacks 2021.
+ekitai.hs is a terminal fluid simulator written in haskell. it is a submission to RUHacks 2021. the simulation algorithm is quite simple, it's a similar particle based one that games like 'the sandbox' and 'terraria' use.
+
+## Usage
+ekitai reads a text file with the desired simulation. samples can be found in the samples/ directory of this repo. valid characters for the simulation are as follows
+- `#`: wall block
+- `~`: water
+- `@`: pump, spawns water below it
+- `O`: drain, removes water around it
## Installation
### Deb based
### Arch based
### Build from Source
-this will be incredibly painful
+as this project does not use stack or cabal or anything, haskell dependencies will have to be installed separately. if you are on arch, make sure you have the following (find equivalent depending on distro):
+- ghc
+- ghc-static
+- ghc-libs
+- haskell-brick
+
+and then simply run `make install`.
## FAQ
**why ekitai?**
--- /dev/null
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+
+ ####### ## ## ######## ######## ##### ######## ## ## #######
+ ### ## #### #### ######## ### ### #### ## ## ### ##
+ ####### ##### ## ## ####### ## ####### #####
+ ####### ##### ## ## ####### ## ####### #####
+ ### ## #### #### ## ## ## #### ## ## ## ## ##
+ ####### ## ## ######## ## ## ## ######## ## ## ## #######
+
+ ####### ## ## ######## ######## ##### ######## ## ## #######
+ ### ## #### #### ######## ### ### #### ## ## ### ##
+ ####### ##### ## ## ####### ## ####### #####
+ ####### ##### ## ## ####### ## ####### #####
+ ### ## #### #### ## ## ## #### ## ## ## ## ##
+ ####### ## ## ######## ## ## ## ######## ## ## ## #######
+
+ ####### ## ## ######## ######## ##### ######## ## ## #######
+ ### ## #### #### ######## ### ### #### ## ## ### ##
+ ####### ##### ## ## ####### ## ####### #####
+ ####### ##### ## ## ####### ## ####### #####
+ ### ## #### #### ## ## ## #### ## ## ## ## ##
+ ####### ## ## ######## ## ## ## ######## ## ## ## #######
+
+ ####### ## ## ######## ######## ##### ######## ## ## #######
+ ### ## #### #### ######## ### ### #### ## ## ### ##
+ ####### ##### ## ## ####### ## ####### #####
+ ####### ##### ## ## ####### ## ####### #####
+ ### ## #### #### ## ## ## #### ## ## ## ## ##
+ ####### ## ## ######## ## ## ## ######## ## ## ## #######
+
+
+
+
+