aboutsummaryrefslogtreecommitdiff
path: root/challenge-281/barroff/julia/ch-1.jl
blob: 60cb1bfdfe29d18f64756d4518491aba0df86dd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env julia

using Test: @test, @testset

function check_color(str::AbstractString)::Bool
    (Int(str[1]) + parse(Int, str[2])) % 2 != 0
end

@testset "check color" begin
    @test check_color("d3") == true
    @test check_color("g5") == false
    @test check_color("e6") == true
end