sts-term

Une version rudimentaire de Slay The Spire dans le terminal - retour accueil

git clone git://bebou.netlib.re/sts-term
Log | Files | Refs | README |

commit 6705994202e50b54d655c6a51692162f1648b355
parent bab489be8546293ceb4426eb4096e508718d1818
Auterice: Arthur Pons <arthur.pons@unistra.fr>
Date:   Wed, 19 Jun 2024 21:39:40 +0200

pickrandom fonction intégrée dans makegame

Diffstat:
Mmakegame | 8+++++++-
Dpickrandom | 5-----
2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/makegame b/makegame @@ -3,6 +3,12 @@ export tmpdir=$(mktemp -d) . ./utils +pickrandom() { + find bdd/"${1:?give location}" -type f | + shuf | + head -n1 +} + addcard() { nbcard=$(find deck -name "$2-*" | wc -l) [ "$nbcard" = '0' ] && count=1 || count=$nbcard @@ -44,7 +50,7 @@ done mkdir -p deck relics -c=$(./pickrandom characters) +c=$(pickrandom characters) < $c grep -Ev "(deck|relic)" > player < $c grep deck | cut -f2- | diff --git a/pickrandom b/pickrandom @@ -1,5 +0,0 @@ -#! /bin/sh - -find bdd/"${1:?give location}" -type f | - shuf | - head -n1