chessboard

This commit is contained in:
2023-12-22 20:50:25 -05:00
parent 42bdf9694e
commit 3b19351ce4
11 changed files with 287 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
defmodule ChessboardTest do
use ExUnit.Case
@tag task_id: 1
test "rank_range is a range from 1 to 8" do
assert Chessboard.rank_range() == 1..8
end
@tag task_id: 2
test "file_range is a range from ?A to ?H" do
assert Chessboard.file_range() == ?A..?H
end
@tag task_id: 3
test "ranks is a list of integers from 1 to 8" do
assert Chessboard.ranks() == [1, 2, 3, 4, 5, 6, 7, 8]
end
@tag task_id: 4
test "files is a list of letters (strings) from A to H" do
assert Chessboard.files() == ["A", "B", "C", "D", "E", "F", "G", "H"]
end
end

View File

@@ -0,0 +1,2 @@
ExUnit.start()
ExUnit.configure(exclude: :pending, trace: true, seed: 0)