-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
136 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
namespace Andromeda.Core | ||
|
||
[<RequireQualifiedAccess>] | ||
[<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>] | ||
module GameName = | ||
let create value = GameName value | ||
let unwrap (GameName name) = name | ||
|
||
[<RequireQualifiedAccess>] | ||
[<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>] | ||
module GamePath = | ||
open Andromeda.Core.Helpers | ||
|
||
let private create value = GamePath value | ||
|
||
let ofName name = | ||
name | ||
|> GameName.unwrap | ||
|> Path.removeInvalidFileNameChars | ||
|> create | ||
|
||
[<RequireQualifiedAccess>] | ||
[<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>] | ||
module Game = | ||
let create id name = | ||
{ Game.id = id | ||
name = GameName.create name | ||
image = None | ||
status = Pending } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
namespace Andromeda.Core | ||
|
||
open SimpleOptics | ||
|
||
[<RequireQualifiedAccess>] | ||
module GameOptic = | ||
let id = Lens((fun (x: Game) -> x.id), (fun game value -> { game with id = value })) | ||
|
||
let name = | ||
Lens((fun (x: Game) -> x.name), (fun game value -> { game with name = value })) | ||
|
||
let image = | ||
Lens((fun (x: Game) -> x.image), (fun game value -> { game with image = value })) | ||
|
||
let status = | ||
Lens( | ||
(fun (x: Game) -> x.status), | ||
(fun game value -> { game with status = value }) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.