Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

N-order -> Order-N #29

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ To generate an order-n Aztec diamond, simply call `diamond(n)`

```julia-repl
julia> D = diamond(10)
10-order Tiling{Matrix{AztecDiamonds.Edge}}
Order-10 Tiling{Matrix{AztecDiamonds.Edge}}
🬇🬋🬋🬃
🬇🬋🬋🬃🬇🬋🬋🬃
🬇🬋🬋🬃🬇🬋🬋🬃🬇🬋🬋🬃
Expand Down
6 changes: 3 additions & 3 deletions src/AztecDiamonds.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ the tiling is not fully filled yet.

```jldoctest
julia> t = Tiling(1)
1-order Tiling{Matrix{AztecDiamonds.Edge}}
Order-1 Tiling{Matrix{AztecDiamonds.Edge}}



julia> t[0, 0] = t[1, 0] = AztecDiamonds.RIGHT;

julia> t
1-order Tiling{Matrix{AztecDiamonds.Edge}}
Order-1 Tiling{Matrix{AztecDiamonds.Edge}}
🬇🬋🬋🬃
🬇🬋🬋🬃
```
Expand Down Expand Up @@ -184,7 +184,7 @@ Generates a uniformally random order N diamond tiling.
julia> using Random; Random.seed!(1);

julia> diamond(4)
4-order Tiling{Matrix{AztecDiamonds.Edge}}
Order-4 Tiling{Matrix{AztecDiamonds.Edge}}
🬇🬋🬋🬃
🬇🬋🬋🬃🬇🬋🬋🬃
🬦🬓🬦🬓🬦🬓🬦🬓🬇🬋🬋🬃
Expand Down
2 changes: 1 addition & 1 deletion src/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ using Colors
import ImageShow
using Base64: Base64EncodePipe

Base.summary(io::IO, t::Tiling) = print(io, t.N, "-order ", typeof(t))
Base.summary(io::IO, t::Tiling) = print(io, "Order-", t.N, " ", typeof(t))

function to_img(t::Tiling)
img = fill(colorant"transparent", inds(t.N))
Expand Down
4 changes: 2 additions & 2 deletions test/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
end

@testitem "pretty printing" begin
@test summary(Tiling(2)) == "2-order $Tiling{Matrix{AztecDiamonds.Edge}}"
@test summary(Tiling(2)) == "Order-2 $Tiling{Matrix{AztecDiamonds.Edge}}"
@test repr(Tiling(1)) == "Tiling(1, [NONE NONE; NONE NONE])"

N = 20
Expand Down Expand Up @@ -49,7 +49,7 @@ end
# TODO: should
expected = replace(
"""
4-order $Tiling{Matrix{AztecDiamonds.Edge}}
Order-4 $Tiling{Matrix{AztecDiamonds.Edge}}
🬦🬓 \\
UU \\
🬉🬄 \\
Expand Down
Loading