Browse Source

fixing ascii art

content-update
MSilva95 3 years ago committed by Christopher Fremond
parent
commit
877d3e09f4
  1. 19
      subjects/ascii-art/README.md
  2. 1
      subjects/ascii-art/audit/README.md
  3. 9
      subjects/ascii-art/color/README.md
  4. 10
      subjects/ascii-art/color/audit.md
  5. 64
      subjects/ascii-art/fs/README.md
  6. 176
      subjects/ascii-art/fs/audit.md
  7. 7
      subjects/ascii-art/justify/README.md
  8. 10
      subjects/ascii-art/justify/audit.md
  9. 49
      subjects/ascii-art/output/README.md
  10. 159
      subjects/ascii-art/output/audit.md
  11. 26
      subjects/ascii-art/reverse/README.md
  12. 10
      subjects/ascii-art/reverse/audit.md
  13. 148
      subjects/ascii-art/reverse/example.md
  14. 18
      subjects/push-swap/audit/README.md

19
subjects/ascii-art/README.md

@ -96,6 +96,7 @@ student$ go run . "Hello\n" | cat -e
$ $
$ $
$ $
$
student$ go run . "hello" | cat -e student$ go run . "hello" | cat -e
_ _ _ $ _ _ _ $
| | | | | | $ | | | | | | $
@ -146,6 +147,24 @@ student$ go run . "{Hello There}" | cat -e
\_\ /_/ $ \_\ /_/ $
$ $
$ $
student$ go run . "Hello\nThere" | cat -e
_ _ _ _ $
| | | | | | | | $
| |__| | ___ | | | | ___ $
| __ | / _ \ | | | | / _ \ $
| | | | | __/ | | | | | (_) | $
|_| |_| \___| |_| |_| \___/ $
$
$
_______ _ $
|__ __| | | $
| | | |__ ___ _ __ ___ $
| | | _ \ / _ \ | '__| / _ \ $
| | | | | | | __/ | | | __/ $
|_| |_| |_| \___| |_| \___| $
$
$
$
``` ```
### Allowed packages ### Allowed packages

1
subjects/ascii-art/audit/README.md

@ -77,7 +77,6 @@ $
|_| |_| \___| |_| |_| \___/ $ |_| |_| \___| |_| |_| \___/ $
$ $
$ $
$
_______ _ $ _______ _ $
|__ __| | | $ |__ __| | | $
| | | |__ ___ _ __ ___ $ | | | |__ ___ _ __ ___ $

9
subjects/ascii-art/color/README.md

@ -6,8 +6,15 @@ You must follow the same [instructions](../README.md) as in the first subject bu
The output should manipulate colors using the **flag** `--color=<color>`, in which `--color` is the flag and `<color>` is the color desired by the user. These colors can be achieved using different notations (color code systems, like `RGB`, `hsl`, `ANSI`...), it is up to you to choose which one you want to use. The output should manipulate colors using the **flag** `--color=<color>`, in which `--color` is the flag and `<color>` is the color desired by the user. These colors can be achieved using different notations (color code systems, like `RGB`, `hsl`, `ANSI`...), it is up to you to choose which one you want to use.
- You should be able to specify a single or a set of letters you want to be colored (use your imagination for this one). - You should be able to specify a single or a set of letters that you want to color (use your imagination for this one).
- If the letter is not specified, the whole `string` should be colored. - If the letter is not specified, the whole `string` should be colored.
- The flag must have exactly the same format as above, any other formats must return the following usage message:
```console
Usage: go run . [STRING] [BANNER] [OPTION]
EX: go run . something standard --color=<color>
```
### Instructions ### Instructions

10
subjects/ascii-art/color/audit.md

@ -2,6 +2,16 @@
###### Has the requirement for the allowed packages been respected? (Reminder for this project: only [standard packages](https://golang.org/pkg/)) ###### Has the requirement for the allowed packages been respected? (Reminder for this project: only [standard packages](https://golang.org/pkg/))
##### Try passing as arguments `""banana" --color red"`
```
Usage: go run . [STRING] [OPTION]
EX: go run . something --color=<color>
```
###### Does it display the correct result as above?
##### Try passing as arguments `"hello world" --color=red`. ##### Try passing as arguments `"hello world" --color=red`.
###### Does it display the expected result? ###### Does it display the expected result?

64
subjects/ascii-art/fs/README.md

@ -10,40 +10,46 @@ You must follow the same [instructions](../README.md) as in the first subject bu
- The code must respect the [**good practices**](../../good-practices/README.md). - The code must respect the [**good practices**](../../good-practices/README.md).
- It is recommended that the code should present a **test file**. - It is recommended that the code should present a **test file**.
- You can see all about the **banners** [here](../). - You can see all about the **banners** [here](../).
- The usage must respect this format `go run . [STRING] [BANNER]`, any other formats must return the following usage message:
### Usage
```console ```console
$ go run . "hello" standard Usage: go run . [STRING] [BANNER]
_ _ _
| | | | | |
| |__ ___ | | | | ___
| _ \ / _ \ | | | | / _ \
| | | | | __/ | | | | | (_) |
|_| |_| \___| |_| |_| \___/
$ go run . "Hello There!" shadow
_| _| _| _| _|_|_|_|_| _| _|
_| _| _|_| _| _| _|_| _| _|_|_| _|_| _| _|_| _|_| _|
_|_|_|_| _|_|_|_| _| _| _| _| _| _| _| _|_|_|_| _|_| _|_|_|_| _|
_| _| _| _| _| _| _| _| _| _| _| _| _|
_| _| _|_|_| _| _| _|_| _| _| _| _|_|_| _| _|_|_| _|
EX: go run . something standard
```
### Usage
$ go run . "Hello There!" thinkertoy ```console
$ go run . "hello" standard | cat -e
o o o o o-O-o o _ _ _ $
| | | | | | o | | | | | | $
O--O o-o | | o-o | O--o o-o o-o o-o | | |__ ___ | | | | ___ $
| | |-' | | | | | | | |-' | |-' o | _ \ / _ \ | | | | / _ \ $
o o o-o o o o-o o o o o-o o o-o | | | | | __/ | | | | | (_) | $
O |_| |_| \___| |_| |_| \___/ $
$
$
$
$ go run . "Hello There!" shadow | cat -e
$
_| _| _| _| _|_|_|_|_| _| $
_| _| _|_| _| _| _|_| _| _|_|_| _|_| _| _|_| _|_| $
_|_|_|_| _|_|_|_| _| _| _| _| _| _| _| _|_|_|_| _|_| _|_|_|_| $
_| _| _| _| _| _| _| _| _| _| _| _| _| $
_| _| _|_|_| _| _| _|_| _| _| _| _|_|_| _| _|_|_| $
$
$
$
$ go run . "Hello There!" thinkertoy | cat -e
$
o o o o o-O-o o $
| | | | | | $
O--O o-o | | o-o | O--o o-o o-o o-o $
| | |-' | | | | | | | |-' | |-' $
o o o-o o o o-o o o o o-o o o-o $
$
$
$ $
``` ```

176
subjects/ascii-art/fs/audit.md

@ -2,138 +2,156 @@
###### Has the requirement for the allowed packages been respected? (Reminder for this project: only [standard packages](https://golang.org/pkg/)) ###### Has the requirement for the allowed packages been respected? (Reminder for this project: only [standard packages](https://golang.org/pkg/))
##### Try passing as arguments `"hello" standard` ##### Try passing as arguments `"banana standard abc"`
``` ```
_ _ _ Usage: go run . [STRING] [BANNER]
| | | | | |
| |__ ___ | | | | ___
| _ \ / _ \ | | | | / _ \
| | | | | __/ | | | | | (_) |
|_| |_| \___| |_| |_| \___/
EX: go run . something standard
``` ```
###### Does it display the string in the right template as an ASCII art representation as above? ###### Does it display the correct result as above?
##### Try passing as arguments `"hello world" shadow` ##### Try passing as arguments `"hello" standard | cat -e`
``` ```
_ _ _ $
_| _| _| _| _| | | | | | | $
_|_|_| _|_| _| _| _|_| _| _| _| _|_| _| _|_| _| _|_|_| | |__ ___ | | | | ___ $
_| _| _|_|_|_| _| _| _| _| _| _| _| _| _| _|_| _| _| _| | _ \ / _ \ | | | | / _ \ $
_| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| | | | | | __/ | | | | | (_) | $
_| _| _|_|_| _| _| _|_| _| _| _|_| _| _| _|_|_| |_| |_| \___| |_| |_| \___/ $
$
$
$
``` ```
###### Does it display the string in the right template as an ASCII art representation as above? ###### Does it display the string in the right template as an ASCII art representation as above?
##### Try passing as arguments `"nice 2 meet you" thinkertoy` ##### Try passing as arguments `"hello world" shadow | cat -e`
``` ```
$
-- o _| _| _| _| _| $
o o o | _|_|_| _|_| _| _| _|_| _| _| _| _|_| _| _|_| _| _|_|_| $
o-o o-o o-o / o-O-o o-o o-o -o- o o o-o o o _| _| _|_|_|_| _| _| _| _| _| _| _| _| _| _|_| _| _| _| $
| | | | |-' / | | | |-' |-' | | | | | | | _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| $
o o | o-o o-o o--o o o o o-o o-o o o--O o-o o--o _| _| _|_|_| _| _| _|_| _| _| _|_| _| _| _|_|_| $
| $
o--o $
$
``` ```
###### Does it display the string in the right template as an ASCII art representation as above? ###### Does it display the string in the right template as an ASCII art representation as above?
##### Try passing as arguments `"you & me" standard` ##### Try passing as arguments `"nice 2 meet you" thinkertoy | cat -e`
``` ```
$
___ -- o $
_ _ ___ _ _ ( _ ) _ __ ___ ___ o o o | $
| | | | / _ \ | | | | / _ \/\ | '_ ` _ \ / _ \ o-o o-o o-o / o-O-o o-o o-o -o- o o o-o o o $
| |_| | | (_) | | |_| | | (_> < | | | | | | | __/ | | | | |-' / | | | |-' |-' | | | | | | | $
\__, | \___/ \__,_| \___/\/ |_| |_| |_| \___| o o | o-o o-o o--o o o o o-o o-o o o--O o-o o--o $
__/ / | $
|___/ o--o $
$
``` ```
###### Does it display the string in the right template as an ASCII art representation as above? ###### Does it display the string in the right template as an ASCII art representation as above?
##### Try passing as arguments `"123" shadow` ##### Try passing as arguments `"you & me" standard | cat -e`
``` ```
$
_| _|_| _|_|_| ___ $
_|_| _| _| _| _ _ ___ _ _ ( _ ) _ __ ___ ___ $
_| _| _|_| | | | | / _ \ | | | | / _ \/\ | '_ ` _ \ / _ \ $
_| _| _| | |_| | | (_) | | |_| | | (_> < | | | | | | | __/ $
_| _|_|_|_| _|_|_| \__, | \___/ \__,_| \___/\/ |_| |_| |_| \___| $
__/ / $
|___/ $
$
``` ```
###### Does it display the string in the right template as an ASCII art representation as above? ###### Does it display the string in the right template as an ASCII art representation as above?
##### Try passing as arguments `"/(\")" thinkertoy` ##### Try passing as arguments `"123" shadow | cat -e`
``` ```
o o $
o / | | \ _| _|_| _|_|_| $
/ o o _|_| _| _| _| $
o | | _| _| _|_| $
/ o o _| _| _| $
o \ / _| _|_|_|_| _|_|_| $
$
$
$
``` ```
###### Does it display the string in the right template as an ASCII art representation as above? ###### Does it display the string in the right template as an ASCII art representation as above?
##### Try passing as arguments `"ABCDEFGHIJKLMNOPQRSTUVWXYZ" shadow` ##### Try passing as arguments `"/(\")" thinkertoy | cat -e`
```
o o $
o / | | \ $
/ o o $
o | | $
/ o o $
o \ / $
$
$
$
``` ```
_|_| _|_|_| _|_|_| _|_|_| _|_|_|_| _|_|_|_| _|_|_| _| _| _|_|_| _| _| _| _| _| _| _| _| _|_| _|_|_| _|_| _|_|_| _|_|_| _|_|_|_|_| _| _| _| _| _| _| _| _| _| _| _|_|_|_|_| ###### Does it display the string in the right template as an ASCII art representation as above?
_| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _|_| _|_| _|_| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _|
_|_|_|_| _|_|_| _| _| _| _|_|_| _|_|_| _| _|_| _|_|_|_| _| _| _|_| _| _| _| _| _| _| _| _| _| _|_|_| _| _|_| _|_|_| _|_| _| _| _| _| _| _| _| _| _| _| _|
_| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _|_| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _|
_| _| _|_|_| _|_|_| _|_|_| _|_|_|_| _| _|_|_| _| _| _|_|_| _|_| _| _| _|_|_|_| _| _| _| _| _|_| _| _|_| _| _| _| _|_|_| _| _|_| _| _| _| _| _| _| _|_|_|_|_|
##### Try passing as arguments `"ABCDEFGHIJKLMNOPQRSTUVWXYZ" shadow | cat -e`
```
$
_|_| _|_|_| _|_|_| _|_|_| _|_|_|_| _|_|_|_| _|_|_| _| _| _|_|_| _| _| _| _| _| _| _| _| _|_| _|_|_| _|_| _|_|_| _|_|_| _|_|_|_|_| _| _| _| _| _| _| _| _| _| _| _|_|_|_|_| $
_| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _|_| _|_| _|_| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| $
_|_|_|_| _|_|_| _| _| _| _|_|_| _|_|_| _| _|_| _|_|_|_| _| _| _|_| _| _| _| _| _| _| _| _| _| _|_|_| _| _|_| _|_|_| _|_| _| _| _| _| _| _| _| _| _| _| _| $
_| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _|_| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| $
_| _| _|_|_| _|_|_| _|_|_| _|_|_|_| _| _|_|_| _| _| _|_|_| _|_| _| _| _|_|_|_| _| _| _| _| _|_| _| _|_| _| _| _| _|_|_| _| _|_| _| _| _| _| _| _| _|_|_|_|_| $
$
$
$
``` ```
###### Does it display the string in the right template as an ASCII art representation as above? ###### Does it display the string in the right template as an ASCII art representation as above?
##### Try passing as arguments `"\"#$%&/()*+,-./" thinkertoy` ##### Try passing as arguments `"\"#$%&/()*+,-./" thinkertoy | cat -e`
``` ```
o o | | | | $
| | | | -O-O- O o / \ o | o o | | | | -O-O- O o / \ o | o o $
-O-O- o | | o / o / o o \|/ | / -O-O- o | | o / o / o o \|/ | / $
| | -O-O- / /| o | | --O-- -o- o | | -O-O- / /| o | | --O-- -o- o $
-O-O- | | o / o o-O- / o o /|\ | o-o / -O-O- | | o / o o-O- / o o /|\ | o-o / $
| | -O-O- O | o \ / o | o o O o | | -O-O- O | o \ / o | o o O o $
| | | | | | $
$
$
``` ```
###### Does it display the string in the right template as an ASCII art representation as above? ###### Does it display the string in the right template as an ASCII art representation as above?
##### Try passing as arguments `"It's Working" thinkertoy` ##### Try passing as arguments `"It's Working" thinkertoy | cat -e`
``` ```
o o $
o-O-o o | o o o o-O-o o | o o o $
| | | | | / o | | | | | / o $
| -o- o-o o o o o-o o-o OO o-o o--o | -o- o-o o o o o-o o-o OO o-o o--o $
| | \ \ / \ / | | | | \ | | | | | | | \ \ / \ / | | | | \ | | | | | $
o-O-o o o-o o o o-o o o o | o o o--O o-O-o o o-o o o o-o o o o | o o o--O $
| | $
o--o o--o $
$
``` ```
###### Does it display the string in the right template as an ASCII art representation as above? ###### Does it display the string in the right template as an ASCII art representation as above?

7
subjects/ascii-art/justify/README.md

@ -18,6 +18,13 @@ To change the alignment of the output it must be possible to use a **flag** `--a
- justify - justify
- You must adapt your representation to the terminal size. If you reduce the terminal window the graphical representation should be adapted to the terminal size. - You must adapt your representation to the terminal size. If you reduce the terminal window the graphical representation should be adapted to the terminal size.
- The flag must have exactly the same format as above, any other formats must return the following usage message:
```console
Usage: go run . [STRING] [BANNER] [OPTION]
EX: go run . something standard --align=right
```
### Instructions ### Instructions

10
subjects/ascii-art/justify/audit.md

@ -2,6 +2,16 @@
###### Has the requirement for the allowed packages been respected? (Reminder for this project: only [standard packages](https://golang.org/pkg/)) ###### Has the requirement for the allowed packages been respected? (Reminder for this project: only [standard packages](https://golang.org/pkg/))
##### Try passing as arguments `"banana standard --align right"`
```
Usage: go run . [STRING] [BANNER] [OPTION]
EX: go run . something standard --align=right
```
###### Does it display the correct result as above?
##### Try passing as arguments `"left standard --align=right"` ##### Try passing as arguments `"left standard --align=right"`
###### Does it display the correct result at the right side? ###### Does it display the correct result at the right side?

49
subjects/ascii-art/output/README.md

@ -2,10 +2,18 @@
### Objectives ### Objectives
- You must follow the same [instructions](../README.md) as in the first subject **while** writing the result into a file. Yes, you will read from one file and write to another. - You must follow the same [instructions](../README.md) as in the first subject **while** writing the result into a file.
The file must be named by using the flag `--output=<fileName.txt>`, in which `--output` is the flag and `<fileName.txt>` is the file name which will contain the output. The file must be named by using the flag `--output=<fileName.txt>`, in which `--output` is the flag and `<fileName.txt>` is the file name which will contain the output.
- The flag must have exactly the same format as above, any other formats must return the following usage message:
```console
Usage: go run . [STRING] [BANNER] [OPTION]
EX: go run . something standard --output=<fileName.txt>
```
### Instructions ### Instructions
- Your project must be written in **Go**. - Your project must be written in **Go**.
@ -16,27 +24,26 @@ The file must be named by using the flag `--output=<fileName.txt>`, in which `--
```console ```console
$ go run . "hello" standard --output=banner.txt $ go run . "hello" standard --output=banner.txt
$ cat banner.txt $ cat -e banner.txt
_ _ _ _ _ _ $
| | | | | | | | | | | | $
| |__ ___ | | | | ___ | |__ ___ | | | | ___ $
| _ \ / _ \ | | | | / _ \ | _ \ / _ \ | | | | / _ \ $
| | | | | __/ | | | | | (_) | | | | | | __/ | | | | | (_) | $
|_| |_| \___| |_| |_| \___/ |_| |_| \___| |_| |_| \___/ $
$
$
$
$ go run . "Hello There!" shadow --output=banner.txt $ go run . "Hello There!" shadow --output=banner.txt
$ cat banner.txt $ cat -e banner.txt
$
_| _| _| _| _|_|_|_|_| _| _| _| _| _| _| _|_|_|_|_| _| _| $
_| _| _|_| _| _| _|_| _| _|_|_| _|_| _| _|_| _|_| _| _| _| _|_| _| _| _|_| _| _|_|_| _|_| _| _|_| _|_| _| $
_|_|_|_| _|_|_|_| _| _| _| _| _| _| _| _|_|_|_| _|_| _|_|_|_| _| _|_|_|_| _|_|_|_| _| _| _| _| _| _| _| _|_|_|_| _|_| _|_|_|_| _| $
_| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _| $
_| _| _|_|_| _| _| _|_| _| _| _| _|_|_| _| _|_|_| _| _| _| _|_|_| _| _| _|_| _| _| _| _|_|_| _| _|_|_| _| $
$
$
$ $
``` ```

159
subjects/ascii-art/output/audit.md

@ -2,26 +2,37 @@
###### Has the requirement for the allowed packages been respected? (Reminder for this project: only [standard packages](https://golang.org/pkg/)) ###### Has the requirement for the allowed packages been respected? (Reminder for this project: only [standard packages](https://golang.org/pkg/))
##### Try passing as arguments `"First\nTest" shadow --output=test00.txt` ##### Try passing as arguments `"banana standard --output test00.txt"`
``` ```
student$ cat test00.txt Usage: go run . [STRING] [BANNER] [OPTION]
_|_|_|_| _| _|
_| _| _|_| _|_|_| _|_|_|_|
_|_|_| _| _|_| _|_| _|
_| _| _| _|_| _|
_| _| _| _|_|_| _|_|
EX: go run . something standard --output=<fileName.txt>
```
_|_|_|_|_| _| ###### Does it display the correct result as above?
_| _|_| _|_|_| _|_|_|_|
_| _|_|_|_| _|_| _|
_| _| _|_| _|
_| _|_|_| _|_|_| _|_|
##### Try passing as arguments `"First\nTest" shadow --output=test00.txt`
```
student$ cat test00.txt
$
_|_|_|_| _| _| $
_| _| _|_| _|_|_| _|_|_|_| $
_|_|_| _| _|_| _|_| _| $
_| _| _| _|_| _| $
_| _| _| _|_|_| _|_| $
$
$
$
_|_|_|_|_| _| $
_| _|_| _|_|_| _|_|_|_| $
_| _|_|_|_| _|_| _| $
_| _| _|_| _| $
_| _|_|_| _|_|_| _|_| $
$
$
$
``` ```
###### Does it save the right output in the right file? ###### Does it save the right output in the right file?
@ -30,14 +41,15 @@ _|_|_|_|_| _|
``` ```
student$ cat test01.txt student$ cat test01.txt
_ _ _ _ _ _ $
| | | | | | | | | | | | $
| |__ ___ | | | | ___ | |__ ___ | | | | ___ $
| _ \ / _ \ | | | | / _ \ | _ \ / _ \ | | | | / _ \ $
| | | | | __/ | | | | | (_) | | | | | | __/ | | | | | (_) | $
|_| |_| \___| |_| |_| \___/ |_| |_| \___| |_| |_| \___/ $
$
$
$
``` ```
###### Does it save the right output in the right file? ###### Does it save the right output in the right file?
@ -46,14 +58,15 @@ student$ cat test01.txt
``` ```
student$ cat test02.txt student$ cat test02.txt
__ _ _ _ _ __ __ _ _ _ _ __ $
_ ____ _____ \ \ _| || |_ | | (_) / / _ ____ _____ \ \ _| || |_ | | (_) / / $
/ | |___ \ |___ / ______ \ \ |_ __ _| / __) / / / | |___ \ |___ / ______ \ \ |_ __ _| / __) / / $
| | __) | |_ \ |______| > > _| || |_ \__ \ / / | | __) | |_ \ |______| > > _| || |_ \__ \ / / $
| | / __/ ___) | / / |_ __ _| ( / / / _ | | / __/ ___) | / / |_ __ _| ( / / / _ $
|_| |_____| |____/ /_/ |_||_| |_| /_/ (_) |_| |_____| |____/ /_/ |_||_| |_| /_/ (_) $
$
$
$
``` ```
###### Does it save the right output in the right file? ###### Does it save the right output in the right file?
@ -62,14 +75,15 @@ student$ cat test02.txt
``` ```
student$ cat test03.txt student$ cat test03.txt
$
_| _| _|_|_| _|_| _| _| _| _| _|_| _| _| _|_|_|_|_| _| _| _|_|_| _|_| _| _| _| _| _|_| _| _| _|_|_|_|_| $
_| _| _| _| _| _| _|_|_|_|_| _|_|_| _|_| _| _| _| _| _| _| _| _| _| _| _| _|_|_|_|_| _|_|_| _|_| _| _| _| _| _| $
_|_|_|_| _|_| _| _|_|_|_|_| _| _| _| _|_| _| _|_| _| _| _|_|_| _| _|_|_|_| _|_| _| _|_|_|_|_| _| _| _| _|_| _| _|_| _| _| _|_|_| _| $
_| _| _| _| _|_|_|_|_| _|_| _| _|_| _| _| _| _| _| _| _| _| _| _| _|_|_|_|_| _|_| _| _|_| _| _| _| _| _| _| $
_| _|_|_| _|_|_|_| _| _| _| _|_|_| _| _|_| _|_| _| _| _|_|_|_| _| _|_|_| _|_|_|_| _| _| _| _|_|_| _| _|_| _|_| _| _| _|_|_|_| $
_| _| _| _| $
_|_|_|_|_|_| _|_|_|_|_|_| $
$
``` ```
###### Does it save the right output in the right file? ###### Does it save the right output in the right file?
@ -78,14 +92,15 @@ _|_|_|_| _|_| _| _|_|_|_|_| _| _| _| _|_| _
``` ```
student$ cat test04.txt student$ cat test04.txt
$
_|_|_|_|_| _| _|_|_|_|_| _| $
_| _|_|_| _|_| _| _|_| _|_| _| _|_|_| _|_| _| _|_| _|_| $
_| _| _| _|_|_|_| _|_| _|_|_|_| _| _| _| _|_|_|_| _|_| _|_|_|_| $
_| _| _| _| _| _| _| _| _| _| _| _| $
_| _| _| _|_|_| _| _|_|_| _| _| _| _|_|_| _| _|_|_| $
$
$
$
``` ```
###### Does it save the right output in the right file? ###### Does it save the right output in the right file?
@ -94,14 +109,15 @@ _|_|_|_|_| _|
``` ```
student$ cat test05.txt student$ cat test05.txt
o o | | o o | | $
0 -- o-o o | | | | -O-O- O o 0 -- o-o o | | | | -O-O- O o $
/| o o | \ -O-O- o | | o / / \ /| o o | \ -O-O- o | | o / / \ $
o | / oo O | | -O-O- / o O-o o | / oo O | | -O-O- / o O-o $
| / | o-o / -O-O- | | o / o \ | / | o-o / -O-O- | | o / o \ $
o-o-o o--o o-o o | | -O-O- O o- o-o-o o--o o-o o | | -O-O- O o- $
| | | | $
$
$
``` ```
###### Does it save the right output in the right file? ###### Does it save the right output in the right file?
@ -110,15 +126,15 @@ o-o-o o--o o-o o | | -O-O- O o-
``` ```
student$ cat test06.txt student$ cat test06.txt
$
-- $
-- o o $
o o / o o o-o o o $
/ o o o-o o o / | | | | | | $
/ | | | | | | o--o o--O o-o o--o $
o--o o--O o-o o--o | $
| o--o $
o--o $
``` ```
###### Does it save the right output in the right file? ###### Does it save the right output in the right file?
@ -127,14 +143,15 @@ o--o o--O o-o o--o
``` ```
student$ cat test07.txt student$ cat test07.txt
_______ _ _ _ _ _ _ _______ _ _ _ _ _ _ $
|__ __| | | (_) __ _ | | __ _ | | | | | | |__ __| | | (_) __ _ | | __ _ | | | | | | $
| | ___ ___ | |_ _ _ __ / _` | | | ___ _ __ / _` | ___ _ _ | |_ _ __ _ _ | |_ | | | | ___ ___ | |_ _ _ __ / _` | | | ___ _ __ / _` | ___ _ _ | |_ _ __ _ _ | |_ | | $
| | / _ \ / __| | __| | | | '_ \ | (_| | | | / _ \ | '_ \ | (_| | / _ \ | | | | | __| | '_ \ | | | | | __| | | | | / _ \ / __| | __| | | | '_ \ | (_| | | | / _ \ | '_ \ | (_| | / _ \ | | | | | __| | '_ \ | | | | | __| | | $
| | | __/ \__ \ \ |_ | | | | | | \__, | | | | (_) | | | | | \__, | | (_) | | |_| | \ |_ | |_) | | |_| | \ |_ |_| | | | __/ \__ \ \ |_ | | | | | | \__, | | | | (_) | | | | | \__, | | (_) | | |_| | \ |_ | |_) | | |_| | \ |_ |_| $
|_| \___| |___/ \__| |_| |_| |_| __/ | |_| \___/ |_| |_| __/ | \___/ \__,_| \__| | .__/ \__,_| \__| (_) |_| \___| |___/ \__| |_| |_| |_| __/ | |_| \___/ |_| |_| __/ | \___/ \__,_| \__| | .__/ \__,_| \__| (_) $
|___/ |___/ | | |___/ |___/ | | $
|_| |_| $
$
``` ```
###### Does it save the right output in the right file? ###### Does it save the right output in the right file?

26
subjects/ascii-art/reverse/README.md

@ -8,6 +8,14 @@ Ascii-reverse consists on reversing the process, converting the graphic represen
The argument will be a **flag**, `--reverse=<fileName>`, in which `--reverse` is the flag and `<fileName>` is the file name. The program must then print this `string` in **normal text**. The argument will be a **flag**, `--reverse=<fileName>`, in which `--reverse` is the flag and `<fileName>` is the file name. The program must then print this `string` in **normal text**.
- The flag must have exactly the same format as above, any other formats must return the following usage message:
```console
Usage: go run . [OPTION]
EX: go run . something standard --reverse=<fileName>
```
### Instructions ### Instructions
- Your project must be written in **Go**. - Your project must be written in **Go**.
@ -18,15 +26,15 @@ The argument will be a **flag**, `--reverse=<fileName>`, in which `--reverse` is
```console ```console
$ cat file.txt $ cat file.txt
_ _ _ _ _ _ $
| | | | | | | | | | | | $
| |__ ___ | | | | ___ | |__ ___ | | | | ___ $
| _ \ / _ \ | | | | / _ \ | _ \ / _ \ | | | | / _ \ $
| | | | | __/ | | | | | (_) | | | | | | __/ | | | | | (_) | $
|_| |_| \___| |_| |_| \___/ |_| |_| \___| |_| |_| \___/ $
$
$
$
$ go run . --reverse=file.txt $ go run . --reverse=file.txt
hello hello
$ $

10
subjects/ascii-art/reverse/audit.md

@ -2,6 +2,16 @@
###### Has the requirement for the allowed packages been respected? (Reminder for this project: only [standard packages](https://golang.org/pkg/)) ###### Has the requirement for the allowed packages been respected? (Reminder for this project: only [standard packages](https://golang.org/pkg/))
##### Try passing to the reverse flag `"--reverse example00.txt"` the [example 00](example.md).
```
Usage: go run . [OPTION]
EX: go run . --reverse=<fileName>
```
###### Does it display the correct result as above?
##### Try passing to the reverse flag `"--reverse=example00.txt"` the [example 00](example.md). ##### Try passing to the reverse flag `"--reverse=example00.txt"` the [example 00](example.md).
`Hello World` `Hello World`

148
subjects/ascii-art/reverse/example.md

@ -1,118 +1,116 @@
## ascii-reverse-examples ## ascii-reverse-examples
- Create your file and copy the examples into it. - Create your file and copy the examples into it.
- For better understanding and formatting purpose, we added the dollar sign ($) at the end, this can be copied if you want, choose wisely!
### example00 ### example00
```console ```console
_ _ _ _ __ __ _ _ _ _ _ _ __ __ _ _ $
| | | | | | | | \ \ / / | | | | | | | | | | | | \ \ / / | | | | $
| |__| | ___ | | | | ___ \ \ /\ / / ___ _ __ | | __| | | |__| | ___ | | | | ___ \ \ /\ / / ___ _ __ | | __| | $
| __ | / _ \ | | | | / _ \ \ \/ \/ / / _ \ | '__| | | / _` | | __ | / _ \ | | | | / _ \ \ \/ \/ / / _ \ | '__| | | / _` | $
| | | | | __/ | | | | | (_) | \ /\ / | (_) | | | | | | (_| | | | | | | __/ | | | | | (_) | \ /\ / | (_) | | | | | | (_| | $
|_| |_| \___| |_| |_| \___/ \/ \/ \___/ |_| |_| \__,_| |_| |_| \___| |_| |_| \___/ \/ \/ \___/ |_| |_| \__,_| $
$
$
$
``` ```
### example01 ### example01
```console ```console
$
_ ____ _____ _ ____ _____ $
/ | |___ \ |___ / / | |___ \ |___ / $
| | __) | |_ \ | | __) | |_ \ $
| | / __/ ___) | | | / __/ ___) | $
|_| |_____| |____/ |_| |_____| |____/ $
$
$
$
``` ```
### example02 ### example02
```console ```console
_ _ __ ___ _ _ __ ___ $
_| || |_ ______ \ \ | _| _| || |_ ______ \ \ | _| $
|_ __ _| |______| \ \ | | |_ __ _| |______| \ \ | | $
_| || |_ ______ \ \ | | _| || |_ ______ \ \ | | $
|_ __ _| |______| \ \ | | |_ __ _| |______| \ \ | | $
|_||_| \_\ | |_ |_||_| \_\ | |_ $
|___| |___| $
$
$
``` ```
### example03 ### example03
```console ```console
__ _ _ _ __ _ _ _ $
/ / | | | | (_) __ _ ___ ____ _____ _ _ \ \ | | | | (_) __ _ ___ ____ _____ _ _ $
| | ___ ___ _ __ ___ | |_ | |__ _ _ __ / _` | ( _ ) |___ \ |___ / | || | | | ___ ___ _ __ ___ ___ | |_ | |__ _ _ __ / _` | ( _ ) |___ \ |___ / | || | $
| | / __| / _ \ | '_ ` _ \ | __| | _ \ | | | '_ \ | (_| | / _ \/\ __) | |_ \ | || |_ | | / __| / _ \ | '_ ` _ \ / _ \ | __| | _ \ | | | '_ \ | (_| | / _ \/\ __) | |_ \ | || |_ $
| | \__ \ | (_) | | | | | | | \ |_ | | | | | | | | | | \__, | | (_> < / __/ ___) | |__ _| | | \__ \ | (_) | | | | | | | | __/ \ |_ | | | | | | | | | | \__, | | (_> < / __/ ___) | |__ _| $
| | |___/ \___/ |_| |_| |_| \__| |_| |_| |_| |_| |_| __/ | \___/\/ |_____| |____/ |_| | | |___/ \___/ |_| |_| |_| \___| \__| |_| |_| |_| |_| |_| __/ | \___/\/ |_____| |____/ |_| $
\_\ |___/ /_/ |___/ $
$
$
``` ```
### example04 ### example04
```console ```console
_ _ __ _ _ _ _ _ _ _ __ _ _ _ _ _ $
| | | | / _| __ _ | | (_) (_) _ | | | | | | | | / _| __ _ | | (_) (_) _ | | | | $
__ _ | |__ ___ __| | ___ | |_ / _` | | |__ _ _ | | _ | | _ __ ___ _ __ ___ _ __ __ _ _ __ ___ | |_ _ _ __ __ __ __ __ __ _ _ ____ __ _ | |__ ___ __| | ___ | |_ / _` | | |__ _ _ | | _ | | _ __ ___ _ __ ___ _ __ __ _ _ __ ___ | |_ _ _ __ __ __ __ __ __ _ _ ____ $
/ _` | | '_ \ / __| / _` | / _ \ | _| | (_| | | _ \ | | | | | |/ / | | | '_ ` _ \ | '_ \ / _ \ | '_ \ / _` | | '__| / __| | __| | | | | \ \ / / \ \ /\ / / \ \/ / | | | | |_ / / _` | | '_ \ / __| / _` | / _ \ | _| | (_| | | _ \ | | | | | |/ / | | | '_ ` _ \ | '_ \ / _ \ | '_ \ / _` | | '__| / __| | __| | | | | \ \ / / \ \ /\ / / \ \/ / | | | | |_ / $
| (_| | | |_) | | (__ | (_| | | __/ | | \__, | | | | | | | | | | < | | | | | | | | | | | | | (_) | | |_) | | (_| | | | \__ \ \ |_ | |_| | \ V / \ V V / > < | |_| | / / | (_| | | |_) | | (__ | (_| | | __/ | | \__, | | | | | | | | | | < | | | | | | | | | | | | | (_) | | |_) | | (_| | | | \__ \ \ |_ | |_| | \ V / \ V V / > < | |_| | / / $
\__,_| |_.__/ \___| \__,_| \___| |_| __/ | |_| |_| |_| | | |_|\_\ |_| |_| |_| |_| |_| |_| \___/ | .__/ \__, | |_| |___/ \__| \__,_| \_/ \_/\_/ /_/\_\ \__, | /___| \__,_| |_.__/ \___| \__,_| \___| |_| __/ | |_| |_| |_| | | |_|\_\ |_| |_| |_| |_| |_| |_| \___/ | .__/ \__, | |_| |___/ \__| \__,_| \_/ \_/\_/ /_/\_\ \__, | /___| $
|___/ _/ | | | | | __/ / |___/ _/ | | | | | __/ / $
|__/ |_| |_| |___/ |__/ |_| |_| |___/ $
$
``` ```
### example05 ### example05
```console ```console
__ _ _ _ _ _ _ _ __ _ __ __ _ __ __ _ _ _ _ _ _ _ __ _ __ __ _ __ $
\ \ | | ( | ) _| || |_ | | (_) / / ___ ( ) / / \ \ /\| |/\ _ / / \ \ | | ( | ) _| || |_ | | (_) / / ___ ( ) / / \ \ /\| |/\ _ / / $
\ \ | | V V |_ __ _| / __) / / ( _ ) |/ | | | | \ ` ' / _| |_ ______ / / \ \ | | V V |_ __ _| / __) / / ( _ ) |/ | | | | \ ` ' / _| |_ ______ / / $
\ \ | | _| || |_ \__ \ / / / _ \/\ | | | | |_ _| |_ _| |______| / / \ \ | | _| || |_ \__ \ / / / _ \/\ | | | | |_ _| |_ _| |______| / / $
\ \ |_| |_ __ _| ( / / / _ | (_> < | | | | / , . \ |_| _ _ / / \ \ |_| |_ __ _| ( / / / _ | (_> < | | | | / , . \ |_| _ _ / / $
\_\ (_) |_||_| |_| /_/ (_) \___/\/ | | | | \/|_|\/ ( ) (_) /_/ \_\ (_) |_||_| |_| /_/ (_) \___/\/ | | | | \/|_|\/ ( ) (_) /_/ $
\_\ /_/ |/ \_\ /_/ |/ $
$
$
``` ```
### example06 ### example06
```console ```console
__ __ ___ __ __ ___ $
_ _ / / ______ \ \ |__ \ ____ _ _ / / ______ \ \ |__ \ ____ $
(_) (_) / / |______| \ \ ) | / __ \ (_) (_) | | |______| | | ) | / __ \ $
< < ______ > > / / / / _` | / / ______ \ \ / / / / _` | $
_ _ \ \ |______| / / |_| | | (_| | _ _ \ \ |______| / / |_| | | (_| | $
(_) ( ) \_\ /_/ (_) \ \__,_| (_) ( ) | | | | (_) \ \__,_| $
|/ \____/ |/ \_\ /_/ \____/ $
$
$
``` ```
### example07 ### example07
```console ```console
____ _____ _____ ______ ______ _____ _ _ _____ _ _ __ _ __ __ _ _ ____ _____ ____ _____ _____ _______ _ _ __ __ __ __ __ __ __ __ ______ ____ _____ _____ ______ ______ _____ _ _ _____ _ _ __ _ __ __ _ _ ____ _____ ____ _____ _____ _______ _ _ __ __ __ __ __ __ __ __ ______ $
/\ | _ \ / ____| | __ \ | ____| | ____| / ____| | | | | |_ _| | | | |/ / | | | \/ | | \ | | / __ \ | __ \ / __ \ | __ \ / ____| |__ __| | | | | \ \ / / \ \ / / \ \ / / \ \ / / |___ / /\ | _ \ / ____| | __ \ | ____| | ____| / ____| | | | | |_ _| | | | |/ / | | | \/ | | \ | | / __ \ | __ \ / __ \ | __ \ / ____| |__ __| | | | | \ \ / / \ \ / / \ \ / / \ \ / / |___ / $
/ \ | |_) | | | | | | | | |__ | |__ | | __ | |__| | | | | | | ' / | | | \ / | | \| | | | | | | |__) | | | | | | |__) | | (___ | | | | | | \ \ / / \ \ /\ / / \ V / \ \_/ / / / / \ | |_) | | | | | | | | |__ | |__ | | __ | |__| | | | | | | ' / | | | \ / | | \| | | | | | | |__) | | | | | | |__) | | (___ | | | | | | \ \ / / \ \ /\ / / \ V / \ \_/ / / / $
/ /\ \ | _ < | | | | | | | __| | __| | | |_ | | __ | | | _ | | | < | | | |\/| | | . ` | | | | | | ___/ | | | | | _ / \___ \ | | | | | | \ \/ / \ \/ \/ / > < \ / / / / /\ \ | _ < | | | | | | | __| | __| | | |_ | | __ | | | _ | | | < | | | |\/| | | . ` | | | | | | ___/ | | | | | _ / \___ \ | | | | | | \ \/ / \ \/ \/ / > < \ / / / $
/ ____ \ | |_) | | |____ | |__| | | |____ | | | |__| | | | | | _| |_ | |__| | | . \ | |____ | | | | | |\ | | |__| | | | | |__| | | | \ \ ____) | | | | |__| | \ / \ /\ / / . \ | | / /__ / ____ \ | |_) | | |____ | |__| | | |____ | | | |__| | | | | | _| |_ | |__| | | . \ | |____ | | | | | |\ | | |__| | | | | |__| | | | \ \ ____) | | | | |__| | \ / \ /\ / / . \ | | / /__ $
/_/ \_\ |____/ \_____| |_____/ |______| |_| \_____| |_| |_| |_____| \____/ |_|\_\ |______| |_| |_| |_| \_| \____/ |_| \___\_\ |_| \_\ |_____/ |_| \____/ \/ \/ \/ /_/ \_\ |_| /_____| /_/ \_\ |____/ \_____| |_____/ |______| |_| \_____| |_| |_| |_____| \____/ |_|\_\ |______| |_| |_| |_| \_| \____/ |_| \___\_\ |_| \_\ |_____/ |_| \____/ \/ \/ \/ /_/ \_\ |_| /_____| $
$
$
$
``` ```

18
subjects/push-swap/audit/README.md

@ -6,15 +6,15 @@
###### Does it display nothing? ###### Does it display nothing?
##### Try to run `"./push-swap 2 1 3 6 5 8"`. ##### Try to run `"./push-swap "2 1 3 6 5 8""`.
###### Does it display a valid solution and less than 9 instructions? ###### Does it display a valid solution and less than 9 instructions?
##### Try to run `"./push-swap 0 1 2 3 4 5"`. ##### Try to run `"./push-swap "0 1 2 3 4 5""`.
###### Does it display nothing? ###### Does it display nothing?
##### Try to run `"./push-swap 0 one 2 3"`. ##### Try to run `"./push-swap "0 one 2 3""`.
```console ```console
Error Error
@ -22,7 +22,7 @@ Error
###### Does it display the correct result as above? ###### Does it display the correct result as above?
##### Try to run `"./push-swap 1 2 2 3"`. ##### Try to run `"./push-swap "1 2 2 3""`.
```console ```console
Error Error
@ -30,11 +30,11 @@ Error
###### Does it display the correct result as above? ###### Does it display the correct result as above?
##### Try to run `"./push-swap <5 random numbers>"` with 5 random numbers instead of the tag. ##### Try to run `"./push-swap "<5 random numbers>""` with 5 random numbers instead of the tag.
###### Does it display a valid solution and less than 12 instructions? ###### Does it display a valid solution and less than 12 instructions?
##### Try to run `"./push-swap <5 random numbers>"` with 5 different random numbers instead of the tag. ##### Try to run `"./push-swap "<5 random numbers>""` with 5 different random numbers instead of the tag.
###### Does it still displays a valid solution and less than 12 instructions? ###### Does it still displays a valid solution and less than 12 instructions?
@ -42,7 +42,7 @@ Error
###### Does it display nothing? ###### Does it display nothing?
##### Try to run `"./checker 0 one 2 3"`. ##### Try to run `"./checker "0 one 2 3""`.
```console ```console
Error Error
@ -50,7 +50,7 @@ Error
###### Does it display the correct result as above? ###### Does it display the correct result as above?
##### Try to run `"echo -e "sa\npb\nrrr\n" | ./checker 0 9 1 8 2 7 3 6 4 5"`. ##### Try to run `"echo -e "sa\npb\nrrr\n" | ./checker "0 9 1 8 2 7 3 6 4 5""`.
```console ```console
KO KO
@ -58,7 +58,7 @@ KO
###### Does it display the correct result as above? ###### Does it display the correct result as above?
##### Try to run `"echo -e "pb\nra\npb\nra\nsa\nra\npa\npa\n" | ./checker 0 9 1 8 2"`. ##### Try to run `"echo -e "pb\nra\npb\nra\nsa\nra\npa\npa\n" | ./checker "0 9 1 8 2""`.
```console ```console
OK OK

Loading…
Cancel
Save