about summary refs log blame commit diff stats
path: root/README
blob: a5786576d43c87bf0e69fd741d36742871a8a573 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11










                                                                                                                                                              
    











                                                                                                                                                                                             












                                                                     

















































































                                                                             
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                 ANTLIA
            Antlia is a text based Rock paper scissors game

                                Andinus
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━


Table of Contents
─────────────────

Demo
Installation
Documentation
News


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 Website          <https://andinus.nand.sh/antlia>
 Source           <https://git.tilde.institute/andinus/antlia>
 GitHub (mirror)  <https://github.com/andinus/antlia>
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━


Demo
════

  This was recorded with `asciinema'.

  [https://asciinema.org/a/410736.png]

  ⁃ Antlia v0.1.0: <https://asciinema.org/a/410736>


[https://asciinema.org/a/410736.png] <https://asciinema.org/a/410736>


Installation
════════════

  Antlia is released to CPAN, you can get it from there or install it
  from source. In any case, `zef' is required to install the
  distribution.

  You can run Antlia without `zef'. Just run `raku -Ilib bin/antlia'
  from within the source directory.


Release
───────

  1. Run `zef install antlia'.

  Antlia should be installed, try running `antlia --version' to confirm.


From Source
───────────

  You can either download the release archive generated by cgit/GitHub
  or clone the project if you have `git' installed.


Without `git'
╌╌╌╌╌╌╌╌╌╌╌╌╌

  1. Download the release:
     • <https://git.tilde.institute/andinus/antlia>
     • <https://github.com/andinus/antlia/releases>
  2. Extract the file.
  3. Run `zef install .' in source directory.


With `git'
╌╌╌╌╌╌╌╌╌╌

  All commits will be signed by my [PGP Key].

  ┌────
  │ # Clone the project.
  │ git clone https://git.tilde.institute/andinus/antlia
  │ cd antlia
  │
  │ # Install octans.
  │ zef install .
  └────


[PGP Key]
<https://andinus.nand.sh/static/D9AE4AEEE1F1B3598E81D9DFB67D55D482A799FD.asc>


Documentation
═════════════

Implementation
──────────────

  Just enter the player names & it'll print each throw along with
  scores. Press enter to play another round.


Options
───────

players
╌╌╌╌╌╌╌

  Number of players. Default is 2, should be an integer equal to 2.
  Support for more than 2 players will be added later.


News
════

v0.1.0 - 2021-04-29
───────────────────

  Initial Implementation
he positions that we've already visited. @visited? is copy, # If true then every iteration of walking is returned. Bool :$visualize, --> List ) is export { # If @visited was not passed then mark the given cell as visited # because it's the cell we're starting at. @visited[$y][$x] = True unless @visited; take "", @visited if $visualize; # neighbor block loops over the neighbors of $y, $x. neighbor: for neighbors(@puzzle, $y, $x).List -> $pos { # Move on to next neighbor if we've already visited this one. next neighbor if @visited[$pos[0]][$pos[1]]; # Mark this cell as visited but only until we search this # path. When moving to next neighbor, mark it False. @visited[$pos[0]][$pos[1]] = True; # $word is the string that we're going to lookup in the # dictionary. my Str $word = $str ~ @puzzle[$pos[0]][$pos[1]]; # range-starts-with returns a list of all words in the # dictionary that start with $word. with range-starts-with(@dict, $word) -> @list { if @list.elems > 0 { # If $word exist in the dictionary then it should be # the first element in the list. take @list[0], @visited if @list[0] eq $word; # Continue on this path because there are 1 or more # elements in @list which means we could find a word. word-search( # Don't pass the whole dictionary for next search. # Words that start with "ab" will always be a # subset of words that start with "a", so keeping # this in mind we pass the output of last # range-starts-with (@list). @list, @puzzle, $pos[0], $pos[1], $word, @visited, :$visualize, ); } } # We're done looking up this path, mark this cell as False & # move on to another neighbor. @visited[$pos[0]][$pos[1]] = False; } }