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 |

commit 397ece31da777247149a315cf50d76886ef42cd1
parent 424c6c5e8446580f4b709f8a45a06501cc505a10
Auterice: Arthur Pons <arthur.pons@unistra.fr>
Date:   Wed, 19 Jun 2024 11:05:16 +0200

displayround -> makeui

makeui génère UI qu'on cat

Diffstat:
Ddisplayround | 15---------------
Amakeui | 17+++++++++++++++++
2 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/displayround b/displayround @@ -1,15 +0,0 @@ -#! /bin/sh - -showstat() { - [ "$2" = "name" ] && { basename $1; return; } - grep "$2" "$1" | sed 's/\t/ : /' -} -echo "Player\n" -showstat player gold -showstat player health -echo -echo "Ennemies\n" -showstat map/1/* name -showstat map/1/* health -echo - diff --git a/makeui b/makeui @@ -0,0 +1,17 @@ +#! /bin/sh + +[ ! -e "player" ] && { printf "player doesn't exist\n"; exit 1; } + +showstat() { + [ "$2" = "name" ] && { basename $1; return; } + grep "$2" "$1" | sed 's/\t/ : /' +} +echo "Player\n" +showstat player gold +showstat player health +echo +echo "Ennemies\n" +showstat map/1/* name +showstat map/1/* health +echo +