mirror of
https://github.com/danbee/chess
synced 2025-03-04 08:39:06 +00:00
These should be using GameState
This commit is contained in:
parent
0649f0f937
commit
f03692c9b9
@ -18,7 +18,7 @@ defmodule ChessWeb.GameView do
|
||||
|
||||
def state(conn, game) do
|
||||
cond do
|
||||
Game.game_over?(game) ->
|
||||
GameState.game_over?(game) ->
|
||||
states[game.state]
|
||||
your_turn?(conn, game) ->
|
||||
"Your turn"
|
||||
@ -27,7 +27,7 @@ defmodule ChessWeb.GameView do
|
||||
end
|
||||
|
||||
def turn_class(conn, game) do
|
||||
if your_turn?(conn, game) && !Game.game_over?(game) do
|
||||
if your_turn?(conn, game) && !GameState.game_over?(game) do
|
||||
"your-turn"
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user