Skip to content

Added Binary: Genius Square solver

Choose a tag to compare

@raj-open raj-open released this 05 Sep 07:51
· 43 commits to main since this release
64b3b12
  • Cleaned up infrastructure to develop and run binaries.

  • Added first (non-helloworld) binary: GeniusSquare (see README.md).

  • Example execution:

    Calling

    just run-rust GeniusSquare B1 C4 D6 F1 F2 F3 F5

    results in

    Roll: B1, C4, D6, F1, F2, F3, F5.
    
    
    Problem:
    ╔═══╦═══╤═══╤═══╤═══╤═══╤═══╕
    ║   ║ A │ B │ C │ D │ E │ F │
    ╠═══╬═══╪═══╪═══╪═══╪═══╪═══╡
    ║ 1 ║   │ ■ │   │   │   │ ■ │
    ╠───╬───┼───┼───┼───┼───┼───┤
    ║ 2 ║   │   │   │   │   │ ■ │
    ╠───╬───┼───┼───┼───┼───┼───┤
    ║ 3 ║   │   │   │   │   │ ■ │
    ╠───╬───┼───┼───┼───┼───┼───┤
    ║ 4 ║   │   │ ■ │   │   │   │
    ╠───╬───┼───┼───┼───┼───┼───┤
    ║ 5 ║   │   │   │   │   │ ■ │
    ╠───╬───┼───┼───┼───┼───┼───┤
    ║ 6 ║   │   │   │ ■ │   │   │
    ╙───╨───┴───┴───┴───┴───┴───┘
    
    Compute solution...
    
    ...completed in 725.18ms
    
    Solution:
    ╔═══╦═══╤═══╤═══╤═══╤═══╤═══╕
    ║   ║ A │ B │ C │ D │ E │ F │
    ╠═══╬═══╪═══╪═══╪═══╪═══╪═══╡
    ║ 1 ║ 1 │ ■ │ 2 │ 2 │ Z │ ■ │
    ╠───╬───┼───┼───┼───┼───┼───┤
    ║ 2 ║ L │ X │ X │ Z │ Z │ ■ │
    ╠───╬───┼───┼───┼───┼───┼───┤
    ║ 3 ║ L │ X │ X │ Z │ T │ ■ │
    ╠───╬───┼───┼───┼───┼───┼───┤
    ║ 4 ║ L │ L │ ■ │ T │ T │ T │
    ╠───╬───┼───┼───┼───┼───┼───┤
    ║ 5 ║ 4 │ 4 │ 4 │ 4 │ C │ ■ │
    ╠───╬───┼───┼───┼───┼───┼───┤
    ║ 6 ║ 3 │ 3 │ 3 │ ■ │ C │ C │
    ╙───╨───┴───┴───┴───┴───┴───┘

    in the console.