Compare commits
9 Commits
a357bbd1f8
...
master
Author | SHA1 | Date | |
---|---|---|---|
2d0a8e13a6 | |||
67547b7226 | |||
fabc2bcf86 | |||
2e287bb2d8 | |||
4dc534848b | |||
33b5a19aae | |||
ea7a690234 | |||
87e345bbfb | |||
37210743bc |
5
Makefile
5
Makefile
@ -25,4 +25,7 @@ mrproper: clean
|
|||||||
|
|
||||||
install: bin/catwalk
|
install: bin/catwalk
|
||||||
@mkdir -p /usr/local/bin/
|
@mkdir -p /usr/local/bin/
|
||||||
cp bin/catwalk /usr/local/bin/
|
install -p bin/catwalk /usr/local/bin/
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
rm -f /usr/local/bin/catwalk
|
33
README.md
33
README.md
@ -1,3 +1,32 @@
|
|||||||
# catwalk-cli
|
# Catwalk CLI
|
||||||
|
|
||||||
Interface en lignes de commande pour le jeu Catwalk
|
Interface en lignes de commande pour le jeu Catwalk
|
||||||
|
|
||||||
|
## Instructions d'installation
|
||||||
|
|
||||||
|
**Attention: La compilation et l'exécution de Catwalk CLI requièrent l'installation de la bibliothèque [libcatwalk](https://git.kaz.bzh/valentin/libcatwalk), version antérieure ou égale à [version 0.1 alpha](https://git.kaz.bzh/valentin/libcatwalk/releases/tag/v0.1alpha).**
|
||||||
|
|
||||||
|
1. Il faut d'abord cloner le dépôt et y accéder (faire attention à la version) :
|
||||||
|
```
|
||||||
|
$ git clone https://git.kaz.bzh/valentin/catwalk-cli.git -n -b v0.1alpha
|
||||||
|
$ cd catwalk-cli
|
||||||
|
```
|
||||||
|
2. Ensuite, il faut compiler :
|
||||||
|
```
|
||||||
|
$ make
|
||||||
|
```
|
||||||
|
3. Enfin, il faut installer :
|
||||||
|
```
|
||||||
|
$ sudo make install
|
||||||
|
```
|
||||||
|
|
||||||
|
## Utilisation
|
||||||
|
|
||||||
|
Une aide précise est disponible sur le [wiki](https://git.kaz.bzh/valentin/catwalk-cli/wiki/).
|
||||||
|
|
||||||
|
## Désinstallation
|
||||||
|
|
||||||
|
Pour désinstaller, il faut exécuter
|
||||||
|
```
|
||||||
|
$ sudo make uninstall
|
||||||
|
```
|
@ -349,8 +349,9 @@ void interact(int width)
|
|||||||
case 2: puts("Cannot move: already went there"); break;
|
case 2: puts("Cannot move: already went there"); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MàJ de prompt
|
||||||
strcpy(buffer, prompt+strlen("d"));
|
strcpy(buffer, prompt+strlen("d"));
|
||||||
|
ltrim(prompt, buffer);
|
||||||
}
|
}
|
||||||
else if STR_STARTS_WITH(prompt, "z")
|
else if STR_STARTS_WITH(prompt, "z")
|
||||||
{
|
{
|
||||||
|
11
src/main.c
11
src/main.c
@ -24,7 +24,7 @@
|
|||||||
#include "interact.h"
|
#include "interact.h"
|
||||||
#include "simplegen.h"
|
#include "simplegen.h"
|
||||||
|
|
||||||
#define PROGRAM_VERSION "1.0"
|
#define PROGRAM_VERSION "Alpha 0.1"
|
||||||
|
|
||||||
void help(char *program_name)
|
void help(char *program_name)
|
||||||
{
|
{
|
||||||
@ -38,12 +38,17 @@ Usage : %s [parameters]\n",
|
|||||||
-s, --simple Create a grid, without permitting to play.\n\
|
-s, --simple Create a grid, without permitting to play.\n\
|
||||||
-w, --width <width> Create a grid with the given width.\n\
|
-w, --width <width> Create a grid with the given width.\n\
|
||||||
--interactive, --simple, --help and --version are mutually exclusive: the last argument is kept.\n\n\
|
--interactive, --simple, --help and --version are mutually exclusive: the last argument is kept.\n\n\
|
||||||
This program was made with love by Valentin Moguerou <valentin@moguerou.net>.");
|
This program was made with love by Valentin Moguerou <valentin@kaz.bzh>.");
|
||||||
}
|
}
|
||||||
|
|
||||||
void version()
|
void version()
|
||||||
{
|
{
|
||||||
printf("Catwalk CLI version 1.0\n");
|
puts("Catwalk CLI version alpha 0.1\n\
|
||||||
|
Copyright (C) 2021 Valentin Moguerou <valentin@kaz.bzh>\n\
|
||||||
|
License GPLv3+ : GNU GPL version 3 or later\n\
|
||||||
|
<https://gnu.org/licenses/gpl.html>\n\
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY.\n\
|
||||||
|
This is free software, and you are welcome to redistribute it under certain conditions.");
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
void simple_generation(int width)
|
void simple_generation(int width)
|
||||||
{
|
{
|
||||||
grid *gd = init_grid(width);
|
grid *gd = init_grid(width);
|
||||||
|
random_start(gd);
|
||||||
refresh_grid(gd);
|
refresh_grid(gd);
|
||||||
|
|
||||||
print_simple_grid(gd);
|
print_simple_grid(gd);
|
||||||
|
Reference in New Issue
Block a user