1
0
mirror of https://github.com/danbee/chess synced 2025-03-04 08:39:06 +00:00

Consistency

This commit is contained in:
Daniel Barber 2018-05-08 13:15:09 +02:00
parent 5fce02feb5
commit 49bba88f07
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8

View File

@ -4,10 +4,10 @@ defmodule Chess.Moves.Pieces.King do
alias Chess.Moves.Generator
def moves(board, {file, rank}) do
Generator.moves(board, {file, rank}, patterns())
Generator.moves(board, {file, rank}, pattern())
end
defp patterns do
defp pattern do
[{1, 1}, {1, 0}, {1, -1}, {0, -1}, {-1, -1}, {-1, 0}, {-1, 1}, {0, 1}]
end
end