Browse Source

fixing ascii art

content-update
MSilva95 3 years ago committed by Christopher Fremond
parent
commit
877d3e09f4
  1. 67
      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. 20
      subjects/push-swap/audit/README.md

67
subjects/ascii-art/README.md

@ -96,35 +96,36 @@ student$ go run . "Hello\n" | cat -e
$
$
$
$
student$ go run . "hello" | cat -e
_ _ _ $
| | | | | | $
| |__ ___ | | | | ___ $
| _ \ / _ \ | | | | / _ \ $
| | | | | __/ | | | | | (_) | $
|_| |_| \___| |_| |_| \___/ $
$
$
_ _ _ $
| | | | | | $
| |__ ___ | | | | ___ $
| _ \ / _ \ | | | | / _ \ $
| | | | | __/ | | | | | (_) | $
|_| |_| \___| |_| |_| \___/ $
$
$
$
student$ go run . "HeLlO" | cat -e
_ _ _ _ ____ $
| | | | | | | | / __ \ $
| |__| | ___ | | | | | | | | $
| __ | / _ \ | | | | | | | | $
| | | | | __/ | |____ | | | |__| | $
|_| |_| \___| |______| |_| \____/ $
$
$
_ _ _ _ ____ $
| | | | | | | | / __ \ $
| |__| | ___ | | | | | | | | $
| __ | / _ \ | | | | | | | | $
| | | | | __/ | |____ | | | |__| | $
|_| |_| \___| |______| |_| \____/ $
$
$
$
student$ go run . "Hello There" | cat -e
_ _ _ _ _______ _ $
| | | | | | | | |__ __| | | $
| |__| | ___ | | | | ___ | | | |__ ___ _ __ ___ $
| __ | / _ \ | | | | / _ \ | | | _ \ / _ \ | '__| / _ \ $
| | | | | __/ | | | | | (_) | | | | | | | | __/ | | | __/ $
|_| |_| \___| |_| |_| \___/ |_| |_| |_| \___| |_| \___| $
$
$
_ _ _ _ _______ _ $
| | | | | | | | |__ __| | | $
| |__| | ___ | | | | ___ | | | |__ ___ _ __ ___ $
| __ | / _ \ | | | | / _ \ | | | _ \ / _ \ | '__| / _ \ $
| | | | | __/ | | | | | (_) | | | | | | | | __/ | | | __/ $
|_| |_| \___| |_| |_| \___/ |_| |_| |_| \___| |_| \___| $
$
$
$
student$ go run . "1Hello 2There" | cat -e
_ _ _ _ _______ _ $
@ -146,6 +147,24 @@ student$ go run . "{Hello There}" | cat -e
\_\ /_/ $
$
$
student$ go run . "Hello\nThere" | cat -e
_ _ _ _ $
| | | | | | | | $
| |__| | ___ | | | | ___ $
| __ | / _ \ | | | | / _ \ $
| | | | | __/ | | | | | (_) | $
|_| |_| \___| |_| |_| \___/ $
$
$
_______ _ $
|__ __| | | $
| | | |__ ___ _ __ ___ $
| | | _ \ / _ \ | '__| / _ \ $
| | | | | | | __/ | | | __/ $
|_| |_| |_| \___| |_| \___| $
$
$
$
```
### 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.
- 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.
- 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

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/))
##### 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`.
###### 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).
- It is recommended that the code should present a **test file**.
- You can see all about the **banners** [here](../).
### Usage
- The usage must respect this format `go run . [STRING] [BANNER]`, any other formats must return the following usage message:
```console
$ go run . "hello" standard
_ _ _
| | | | | |
| |__ ___ | | | | ___
| _ \ / _ \ | | | | / _ \
| | | | | __/ | | | | | (_) |
|_| |_| \___| |_| |_| \___/
$ go run . "Hello There!" shadow
_| _| _| _| _|_|_|_|_| _| _|
_| _| _|_| _| _| _|_| _| _|_|_| _|_| _| _|_| _|_| _|
_|_|_|_| _|_|_|_| _| _| _| _| _| _| _| _|_|_|_| _|_| _|_|_|_| _|
_| _| _| _| _| _| _| _| _| _| _| _| _|
_| _| _|_|_| _| _| _|_| _| _| _| _|_|_| _| _|_|_| _|
Usage: go run . [STRING] [BANNER]
EX: go run . something standard
```
$ go run . "Hello There!" thinkertoy
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
### Usage
```console
$ go run . "hello" standard | cat -e
_ _ _ $
| | | | | | $
| |__ ___ | | | | ___ $
| _ \ / _ \ | | | | / _ \ $
| | | | | __/ | | | | | (_) | $
|_| |_| \___| |_| |_| \___/ $
$
$
$
$ 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/))
##### 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?
##### 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?
##### 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?
##### 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?
##### 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?
##### 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?
##### 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?
##### 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 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 OO 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?

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
- 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

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/))
##### 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"`
###### Does it display the correct result at the right side?

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

@ -2,10 +2,18 @@
### 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 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
- 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
$ go run . "hello" standard --output=banner.txt
$ cat banner.txt
_ _ _
| | | | | |
| |__ ___ | | | | ___
| _ \ / _ \ | | | | / _ \
| | | | | __/ | | | | | (_) |
|_| |_| \___| |_| |_| \___/
$ cat -e 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/))
##### 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?
@ -30,14 +41,15 @@ _|_|_|_|_| _|
```
student$ cat test01.txt
_ _ _
| | | | | |
| |__ ___ | | | | ___
| _ \ / _ \ | | | | / _ \
| | | | | __/ | | | | | (_) |
|_| |_| \___| |_| |_| \___/
_ _ _ $
| | | | | | $
| |__ ___ | | | | ___ $
| _ \ / _ \ | | | | / _ \ $
| | | | | __/ | | | | | (_) | $
|_| |_| \___| |_| |_| \___/ $
$
$
$
```
###### Does it save the right output in the right file?
@ -46,14 +58,15 @@ student$ cat test01.txt
```
student$ cat test02.txt
__ _ _ _ _ __
_ ____ _____ \ \ _| || |_ | | (_) / /
/ | |___ \ |___ / ______ \ \ |_ __ _| / __) / /
| | __) | |_ \ |______| > > _| || |_ \__ \ / /
| | / __/ ___) | / / |_ __ _| ( / / / _
|_| |_____| |____/ /_/ |_||_| |_| /_/ (_)
__ _ _ _ _ __ $
_ ____ _____ \ \ _| || |_ | | (_) / / $
/ | |___ \ |___ / ______ \ \ |_ __ _| / __) / / $
| | __) | |_ \ |______| > > _| || |_ \__ \ / / $
| | / __/ ___) | / / |_ __ _| ( / / / _ $
|_| |_____| |____/ /_/ |_||_| |_| /_/ (_) $
$
$
$
```
###### Does it save the right output in the right file?
@ -62,14 +75,15 @@ student$ cat test02.txt
```
student$ cat test03.txt
_| _| _|_|_| _|_| _| _| _| _| _|_| _| _| _|_|_|_|_|
_| _| _| _| _| _| _|_|_|_|_| _|_|_| _|_| _| _| _| _| _|
_|_|_|_| _|_| _| _|_|_|_|_| _| _| _| _|_| _| _|_| _| _| _|_|_| _|
_| _| _| _| _|_|_|_|_| _|_| _| _|_| _| _| _| _| _| _|
_| _|_|_| _|_|_|_| _| _| _| _|_|_| _| _|_| _|_| _| _| _|_|_|_|
_| _|
_|_|_|_|_|_|
$
_| _| _|_|_| _|_| _| _| _| _| _|_| _| _| _|_|_|_|_| $
_| _| _| _| _| _| _|_|_|_|_| _|_|_| _|_| _| _| _| _| _| $
_|_|_|_| _|_| _| _|_|_|_|_| _| _| _| _|_| _| _|_| _| _| _|_|_| _| $
_| _| _| _| _|_|_|_|_| _|_| _| _|_| _| _| _| _| _| _| $
_| _|_|_| _|_|_|_| _| _| _| _|_|_| _| _|_| _|_| _| _| _|_|_|_| $
_| _| $
_|_|_|_|_|_| $
$
```
###### Does it save the right output in the right file?
@ -78,14 +92,15 @@ _|_|_|_| _|_| _| _|_|_|_|_| _| _| _| _|_| _
```
student$ cat test04.txt
_|_|_|_|_| _|
_| _|_|_| _|_| _| _|_| _|_|
_| _| _| _|_|_|_| _|_| _|_|_|_|
_| _| _| _| _| _|
_| _| _| _|_|_| _| _|_|_|
$
_|_|_|_|_| _| $
_| _|_|_| _|_| _| _|_| _|_| $
_| _| _| _|_|_|_| _|_| _|_|_|_| $
_| _| _| _| _| _| $
_| _| _| _|_|_| _| _|_|_| $
$
$
$
```
###### Does it save the right output in the right file?
@ -94,14 +109,15 @@ _|_|_|_|_| _|
```
student$ cat test05.txt
o o | |
0 -- 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 | | $
0 -- 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- $
| | $
$
$
```
###### 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
--
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?
@ -127,14 +143,15 @@ o--o o--O o-o o--o
```
student$ cat test07.txt
_______ _ _ _ _ _ _
|__ __| | | (_) __ _ | | __ _ | | | | | |
| | ___ ___ | |_ _ _ __ / _` | | | ___ _ __ / _` | ___ _ _ | |_ _ __ _ _ | |_ | |
| | / _ \ / __| | __| | | | '_ \ | (_| | | | / _ \ | '_ \ | (_| | / _ \ | | | | | __| | '_ \ | | | | | __| | |
| | | __/ \__ \ \ |_ | | | | | | \__, | | | | (_) | | | | | \__, | | (_) | | |_| | \ |_ | |_) | | |_| | \ |_ |_|
|_| \___| |___/ \__| |_| |_| |_| __/ | |_| \___/ |_| |_| __/ | \___/ \__,_| \__| | .__/ \__,_| \__| (_)
|___/ |___/ | |
|_|
_______ _ _ _ _ _ _ $
|__ __| | | (_) __ _ | | __ _ | | | | | | $
| | ___ ___ | |_ _ _ __ / _` | | | ___ _ __ / _` | ___ _ _ | |_ _ __ _ _ | |_ | | $
| | / _ \ / __| | __| | | | '_ \ | (_| | | | / _ \ | '_ \ | (_| | / _ \ | | | | | __| | '_ \ | | | | | __| | | $
| | | __/ \__ \ \ |_ | | | | | | \__, | | | | (_) | | | | | \__, | | (_) | | |_| | \ |_ | |_) | | |_| | \ |_ |_| $
|_| \___| |___/ \__| |_| |_| |_| __/ | |_| \___/ |_| |_| __/ | \___/ \__,_| \__| | .__/ \__,_| \__| (_) $
|___/ |___/ | | $
|_| $
$
```
###### 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 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
- Your project must be written in **Go**.
@ -18,15 +26,15 @@ The argument will be a **flag**, `--reverse=<fileName>`, in which `--reverse` is
```console
$ cat file.txt
_ _ _
| | | | | |
| |__ ___ | | | | ___
| _ \ / _ \ | | | | / _ \
| | | | | __/ | | | | | (_) |
|_| |_| \___| |_| |_| \___/
_ _ _ $
| | | | | | $
| |__ ___ | | | | ___ $
| _ \ / _ \ | | | | / _ \ $
| | | | | __/ | | | | | (_) | $
|_| |_| \___| |_| |_| \___/ $
$
$
$
$ go run . --reverse=file.txt
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/))
##### 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).
`Hello World`

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

@ -1,118 +1,116 @@
## ascii-reverse-examples
- 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
```console
_ _ _ _ __ __ _ _
| | | | | | | | \ \ / / | | | |
| |__| | ___ | | | | ___ \ \ /\ / / ___ _ __ | | __| |
| __ | / _ \ | | | | / _ \ \ \/ \/ / / _ \ | '__| | | / _` |
| | | | | __/ | | | | | (_) | \ /\ / | (_) | | | | | | (_| |
|_| |_| \___| |_| |_| \___/ \/ \/ \___/ |_| |_| \__,_|
_ _ _ _ __ __ _ _ $
| | | | | | | | \ \ / / | | | | $
| |__| | ___ | | | | ___ \ \ /\ / / ___ _ __ | | __| | $
| __ | / _ \ | | | | / _ \ \ \/ \/ / / _ \ | '__| | | / _` | $
| | | | | __/ | | | | | (_) | \ /\ / | (_) | | | | | | (_| | $
|_| |_| \___| |_| |_| \___/ \/ \/ \___/ |_| |_| \__,_| $
$
$
$
```
### example01
```console
_ ____ _____
/ | |___ \ |___ /
| | __) | |_ \
| | / __/ ___) |
|_| |_____| |____/
$
_ ____ _____ $
/ | |___ \ |___ / $
| | __) | |_ \ $
| | / __/ ___) | $
|_| |_____| |____/ $
$
$
$
```
### example02
```console
_ _ __ ___
_| || |_ ______ \ \ | _|
|_ __ _| |______| \ \ | |
_| || |_ ______ \ \ | |
|_ __ _| |______| \ \ | |
|_||_| \_\ | |_
|___|
_ _ __ ___ $
_| || |_ ______ \ \ | _| $
|_ __ _| |______| \ \ | | $
_| || |_ ______ \ \ | | $
|_ __ _| |______| \ \ | | $
|_||_| \_\ | |_ $
|___| $
$
$
```
### example03
```console
__ _ _ _ __
/ / | | | | (_) __ _ ___ ____ _____ _ _ \ \
| | ___ ___ _ __ ___ | |_ | |__ _ _ __ / _` | ( _ ) |___ \ |___ / | || | | |
| | / __| / _ \ | '_ ` _ \ | __| | _ \ | | | '_ \ | (_| | / _ \/\ __) | |_ \ | || |_ | |
| | \__ \ | (_) | | | | | | | \ |_ | | | | | | | | | | \__, | | (_> < / __/ ___) | |__ _| | |
| | |___/ \___/ |_| |_| |_| \__| |_| |_| |_| |_| |_| __/ | \___/\/ |_____| |____/ |_| | |
\_\ |___/ /_/
_ _ _ $
| | | | (_) __ _ ___ ____ _____ _ _ $
___ ___ _ __ ___ ___ | |_ | |__ _ _ __ / _` | ( _ ) |___ \ |___ / | || | $
/ __| / _ \ | '_ ` _ \ / _ \ | __| | _ \ | | | '_ \ | (_| | / _ \/\ __) | |_ \ | || |_ $
\__ \ | (_) | | | | | | | | __/ \ |_ | | | | | | | | | | \__, | | (_> < / __/ ___) | |__ _| $
|___/ \___/ |_| |_| |_| \___| \__| |_| |_| |_| |_| |_| __/ | \___/\/ |_____| |____/ |_| $
|___/ $
$
$
```
### example04
```console
_ _ __ _ _ _ _ _
| | | | / _| __ _ | | (_) (_) _ | | | |
__ _ | |__ ___ __| | ___ | |_ / _` | | |__ _ _ | | _ | | _ __ ___ _ __ ___ _ __ __ _ _ __ ___ | |_ _ _ __ __ __ __ __ __ _ _ ____
/ _` | | '_ \ / __| / _` | / _ \ | _| | (_| | | _ \ | | | | | |/ / | | | '_ ` _ \ | '_ \ / _ \ | '_ \ / _` | | '__| / __| | __| | | | | \ \ / / \ \ /\ / / \ \/ / | | | | |_ /
| (_| | | |_) | | (__ | (_| | | __/ | | \__, | | | | | | | | | | < | | | | | | | | | | | | | (_) | | |_) | | (_| | | | \__ \ \ |_ | |_| | \ V / \ V V / > < | |_| | / /
\__,_| |_.__/ \___| \__,_| \___| |_| __/ | |_| |_| |_| | | |_|\_\ |_| |_| |_| |_| |_| |_| \___/ | .__/ \__, | |_| |___/ \__| \__,_| \_/ \_/\_/ /_/\_\ \__, | /___|
|___/ _/ | | | | | __/ /
|__/ |_| |_| |___/
_ _ __ _ _ _ _ _ $
| | | | / _| __ _ | | (_) (_) _ | | | | $
__ _ | |__ ___ __| | ___ | |_ / _` | | |__ _ _ | | _ | | _ __ ___ _ __ ___ _ __ __ _ _ __ ___ | |_ _ _ __ __ __ __ __ __ _ _ ____ $
/ _` | | '_ \ / __| / _` | / _ \ | _| | (_| | | _ \ | | | | | |/ / | | | '_ ` _ \ | '_ \ / _ \ | '_ \ / _` | | '__| / __| | __| | | | | \ \ / / \ \ /\ / / \ \/ / | | | | |_ / $
| (_| | | |_) | | (__ | (_| | | __/ | | \__, | | | | | | | | | | < | | | | | | | | | | | | | (_) | | |_) | | (_| | | | \__ \ \ |_ | |_| | \ V / \ V V / > < | |_| | / / $
\__,_| |_.__/ \___| \__,_| \___| |_| __/ | |_| |_| |_| | | |_|\_\ |_| |_| |_| |_| |_| |_| \___/ | .__/ \__, | |_| |___/ \__| \__,_| \_/ \_/\_/ /_/\_\ \__, | /___| $
|___/ _/ | | | | | __/ / $
|__/ |_| |_| |___/ $
$
```
### example05
```console
__ _ _ _ _ _ _ _ __ _ __ __ _ __
\ \ | | ( | ) _| || |_ | | (_) / / ___ ( ) / / \ \ /\| |/\ _ / /
\ \ | | V V |_ __ _| / __) / / ( _ ) |/ | | | | \ ` ' / _| |_ ______ / /
\ \ | | _| || |_ \__ \ / / / _ \/\ | | | | |_ _| |_ _| |______| / /
\ \ |_| |_ __ _| ( / / / _ | (_> < | | | | / , . \ |_| _ _ / /
\_\ (_) |_||_| |_| /_/ (_) \___/\/ | | | | \/|_|\/ ( ) (_) /_/
\_\ /_/ |/
__ _ _ _ _ _ _ _ __ _ __ __ _ __ $
\ \ | | ( | ) _| || |_ | | (_) / / ___ ( ) / / \ \ /\| |/\ _ / / $
\ \ | | V V |_ __ _| / __) / / ( _ ) |/ | | | | \ ` ' / _| |_ ______ / / $
\ \ | | _| || |_ \__ \ / / / _ \/\ | | | | |_ _| |_ _| |______| / / $
\ \ |_| |_ __ _| ( / / / _ | (_> < | | | | / , . \ |_| _ _ / / $
\_\ (_) |_||_| |_| /_/ (_) \___/\/ | | | | \/|_|\/ ( ) (_) /_/ $
\_\ /_/ |/ $
$
$
```
### example06
```console
__ __ ___
_ _ / / ______ \ \ |__ \ ____
(_) (_) / / |______| \ \ ) | / __ \
< < ______ > > / / / / _` |
_ _ \ \ |______| / / |_| | | (_| |
(_) ( ) \_\ /_/ (_) \ \__,_|
|/ \____/
__ __ ___ $
_ _ / / ______ \ \ |__ \ ____ $
(_) (_) | | |______| | | ) | / __ \ $
/ / ______ \ \ / / / / _` | $
_ _ \ \ |______| / / |_| | | (_| | $
(_) ( ) | | | | (_) \ \__,_| $
|/ \_\ /_/ \____/ $
$
$
```
### example07
```console
____ _____ _____ ______ ______ _____ _ _ _____ _ _ __ _ __ __ _ _ ____ _____ ____ _____ _____ _______ _ _ __ __ __ __ __ __ __ __ ______
/\ | _ \ / ____| | __ \ | ____| | ____| / ____| | | | | |_ _| | | | |/ / | | | \/ | | \ | | / __ \ | __ \ / __ \ | __ \ / ____| |__ __| | | | | \ \ / / \ \ / / \ \ / / \ \ / / |___ /
/ \ | |_) | | | | | | | | |__ | |__ | | __ | |__| | | | | | | ' / | | | \ / | | \| | | | | | | |__) | | | | | | |__) | | (___ | | | | | | \ \ / / \ \ /\ / / \ V / \ \_/ / / /
/ /\ \ | _ < | | | | | | | __| | __| | | |_ | | __ | | | _ | | | < | | | |\/| | | . ` | | | | | | ___/ | | | | | _ / \___ \ | | | | | | \ \/ / \ \/ \/ / > < \ / / /
/ ____ \ | |_) | | |____ | |__| | | |____ | | | |__| | | | | | _| |_ | |__| | | . \ | |____ | | | | | |\ | | |__| | | | | |__| | | | \ \ ____) | | | | |__| | \ / \ /\ / / . \ | | / /__
/_/ \_\ |____/ \_____| |_____/ |______| |_| \_____| |_| |_| |_____| \____/ |_|\_\ |______| |_| |_| |_| \_| \____/ |_| \___\_\ |_| \_\ |_____/ |_| \____/ \/ \/ \/ /_/ \_\ |_| /_____|
____ _____ _____ ______ ______ _____ _ _ _____ _ _ __ _ __ __ _ _ ____ _____ ____ _____ _____ _______ _ _ __ __ __ __ __ __ __ __ ______ $
/\ | _ \ / ____| | __ \ | ____| | ____| / ____| | | | | |_ _| | | | |/ / | | | \/ | | \ | | / __ \ | __ \ / __ \ | __ \ / ____| |__ __| | | | | \ \ / / \ \ / / \ \ / / \ \ / / |___ / $
/ \ | |_) | | | | | | | | |__ | |__ | | __ | |__| | | | | | | ' / | | | \ / | | \| | | | | | | |__) | | | | | | |__) | | (___ | | | | | | \ \ / / \ \ /\ / / \ V / \ \_/ / / / $
/ /\ \ | _ < | | | | | | | __| | __| | | |_ | | __ | | | _ | | | < | | | |\/| | | . ` | | | | | | ___/ | | | | | _ / \___ \ | | | | | | \ \/ / \ \/ \/ / > < \ / / / $
/ ____ \ | |_) | | |____ | |__| | | |____ | | | |__| | | | | | _| |_ | |__| | | . \ | |____ | | | | | |\ | | |__| | | | | |__| | | | \ \ ____) | | | | |__| | \ / \ /\ / / . \ | | / /__ $
/_/ \_\ |____/ \_____| |_____/ |______| |_| \_____| |_| |_| |_____| \____/ |_|\_\ |______| |_| |_| |_| \_| \____/ |_| \___\_\ |_| \_\ |_____/ |_| \____/ \/ \/ \/ /_/ \_\ |_| /_____| $
$
$
$
```

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

@ -6,15 +6,15 @@
###### 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?
##### 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?
##### Try to run `"./push-swap 0 one 2 3"`.
##### Try to run `"./push-swap "0 one 2 3""`.
```console
Error
@ -22,7 +22,7 @@ Error
###### 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
Error
@ -30,19 +30,19 @@ Error
###### 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?
##### 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?
##### Try to run `"./checker "` and input nothing.
##### Try to run `"./checker"` and input nothing.
###### Does it display nothing?
##### Try to run `"./checker 0 one 2 3"`.
##### Try to run `"./checker "0 one 2 3""`.
```console
Error
@ -50,7 +50,7 @@ Error
###### 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
KO
@ -58,7 +58,7 @@ KO
###### 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
OK

Loading…
Cancel
Save