Hangkell-1.0.0: Like Hangman but online!

Copyright>implying
License>implying
MaintainerFlorian Hageneder
Stabilitynone
Portabilitywhat?
Safe HaskellNone
LanguageHaskell2010

Storage

Description

 

Synopsis

Documentation

gameFile :: FilePath Source #

The storage to keep all game sessions

loadGames Source #

Arguments

:: IO [Game]

Loads all stored games from the storage

Returns all the stored games.

loadGame Source #

Arguments

:: Int

GameID to get

-> IO (Maybe Game) 

Returns a single stored game or Nothing

saveGames Source #

Arguments

:: [Game]

All games that should be persisted in the storage

-> IO ()

writes everything the storage

Overrides the whole storage with the given set of games

saveGame Source #

Arguments

:: Game

Single game to update

-> IO ()

Writes result to the file

Overrides the stored game with same ID or appends it to the list

updateGames Source #

Arguments

:: [Game]

List of games that should be updated

-> Game

Game that should be updated or added

-> [Game]

updated list

Takes a set of Games and replaces the game with the same ID as the given updated game. Appends it if there is no such game