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

Tiny transform refactor

This commit is contained in:
Daniel Barber 2018-04-13 17:30:06 -04:00
parent 69a9206046
commit 55fa8a0701
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8

View File

@ -4,7 +4,8 @@ defmodule Chess.Board do
def transform(board) do
Enum.map(0..7, fn (rank) ->
Enum.map(0..7, fn (file) ->
board["#{file},#{rank}"]
board
|> piece({file, rank})
end)
end)
end