Skip to content

Commit

Permalink
Checkpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpearce committed Oct 30, 2023
1 parent e20a052 commit a99c218
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/twenty_forty_eight/game/board.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
defmodule TwentyFortyEight.Game.Board do
@moduledoc """
Game board value store and business logic handler.
"""
@enforce_keys [:cells, :num_rows, :num_cols]
defstruct [:cells, :num_rows, :num_cols]

Expand Down
3 changes: 3 additions & 0 deletions lib/twenty_forty_eight/game/engine.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
defmodule TwentyFortyEight.Game.Engine do
@moduledoc """
Mutate game state via input events.
"""
alias TwentyFortyEight.Game.Board

@doc """
Expand Down
3 changes: 3 additions & 0 deletions lib/twenty_forty_eight/game/game.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
defmodule TwentyFortyEight.Game.Game do
@moduledoc """
Persistance layer for storing game state to a database.
"""
use Ecto.Schema
import Ecto.Changeset

Expand Down
3 changes: 3 additions & 0 deletions lib/twenty_forty_eight/game/manager.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
defmodule TwentyFortyEight.Game.Manager do
@moduledoc """
Store game state and process business logic events.
"""
use GenServer, restart: :transient

alias TwentyFortyEight.Game.{Board, Engine, Game}
Expand Down
1 change: 1 addition & 0 deletions lib/twenty_forty_eight/mailer.ex
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
defmodule TwentyFortyEight.Mailer do
@moduledoc false
use Swoosh.Mailer, otp_app: :twenty_forty_eight
end
2 changes: 1 addition & 1 deletion lib/twenty_forty_eight_web/components/core_components.ex
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ defmodule TwentyFortyEightWeb.CoreComponents do
<button
type={@type}
class={[
"phx-submit-loading:opacity-75 rounded-lg bg-zinc-900 hover:bg-zinc-700 py-2 px-3",
"phx-submit-loading:opacity-75 rounded-lg bg-rose-500 hover:bg-rose-600 py-2 px-3",
"text-sm font-semibold leading-6 text-white active:text-white/80",
@class
]}
Expand Down
1 change: 1 addition & 0 deletions lib/twenty_forty_eight_web/components/layouts.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
defmodule TwentyFortyEightWeb.Layouts do
@moduledoc false
use TwentyFortyEightWeb, :html

embed_templates "layouts/*"
Expand Down
1 change: 1 addition & 0 deletions lib/twenty_forty_eight_web/telemetry.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
defmodule TwentyFortyEightWeb.Telemetry do
@moduledoc false
use Supervisor
import Telemetry.Metrics

Expand Down

0 comments on commit a99c218

Please sign in to comment.