implemented main menu

This commit is contained in:
Jonathan Lamothe
2019-08-20 01:40:59 -04:00
parent 3fab328e17
commit 1662705e4d
4 changed files with 53 additions and 5 deletions
+8 -1
View File
@@ -24,6 +24,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
module Mtlstats.Types (
-- * Types
ProgState (..),
ProgMode (..),
Database (..),
Player (..),
PlayerStats (..),
@@ -32,6 +33,7 @@ module Mtlstats.Types (
-- * Lenses
-- ** ProgState Lenses
database,
progMode,
-- ** Database Lenses
dbPlayers,
dbGoalies,
@@ -86,10 +88,14 @@ import Lens.Micro ((^.))
import Lens.Micro.TH (makeLenses)
-- | Represents the program state
newtype ProgState = ProgState
data ProgState = ProgState
{ _database :: Database
, _progMode :: ProgMode
} deriving (Eq, Show)
-- | The program mode
data ProgMode = MainMenu | NewSeason deriving (Eq, Show)
-- | Represents the database
data Database = Database
{ _dbPlayers :: [Player]
@@ -271,6 +277,7 @@ makeLenses ''GoalieStats
newProgState :: ProgState
newProgState = ProgState
{ _database = newDatabase
, _progMode = MainMenu
}
-- | Constructor for a 'Database'