forked from spaghetti/spaghetti-code-3
feat: readme
This commit is contained in:
parent
230d2cbd50
commit
3f8c67603c
1 changed files with 185 additions and 0 deletions
185
README.md
Normal file
185
README.md
Normal file
|
@ -0,0 +1,185 @@
|
|||
# Spaghetti Codenight
|
||||
|
||||
## Introduction
|
||||
|
||||
Welcome to Spaghetti Codenight!
|
||||
The goal tonight is simple: solve a maze with the worst 💩 code possible!
|
||||
|
||||
However, there are a few restrictions and minimum requirements your code must meet.
|
||||
While it may look bad, it still needs to be functional!
|
||||
|
||||
## Maze
|
||||
|
||||
Everything is done through `stdout` and `stdin`, but don't panic!
|
||||
We've provided a file that handles all the hard work for you (more about this later).
|
||||
|
||||
### Layout
|
||||
|
||||
Your program will receive the maze through `stdin`.
|
||||
A maze is represented using emojis. A tab character `(\t)` represents a new line in the maze, and the maze ends with a newline character `(\n)`.
|
||||
The maze uses five emojis:
|
||||
|
||||
5 different emojis are used
|
||||
- `⬛` A wall.
|
||||
- `⬜` A tile. You can move onto these tiles.
|
||||
- `🟥` A visited tile. These are tiles you've already walked on.
|
||||
- `🍝` You, the player.
|
||||
- `😮` The end of the maze.
|
||||
|
||||
Think of it like this:
|
||||
You're a delicious plate of spaghetti, moving toward a hungry person.
|
||||
As you move, you spill bolognese sauce, marking the ground red.
|
||||
|
||||
<details>
|
||||
<summary>Maze example</summary>
|
||||
|
||||
```
|
||||
⬛⬛⬛⬛⬛⬛⬛
|
||||
⬛🍝⬜⬛⬜⬜⬛
|
||||
⬛⬜⬛⬛⬛⬜⬛
|
||||
⬛⬜⬜⬜⬜⬜⬛
|
||||
⬛⬛⬛⬜⬛⬜⬛
|
||||
⬛⬜⬜⬜⬛😮⬛
|
||||
⬛⬛⬛⬛⬛⬛⬛
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Movement
|
||||
|
||||
You indicate your desired movement by printing a direction to `stdout`.
|
||||
Use the following emojis to move:
|
||||
- `⬆️` Up
|
||||
- `➡️` Right
|
||||
- `⬇️` Down
|
||||
- `⬅️` Left
|
||||
|
||||
### End
|
||||
|
||||
When you reach the end, your program will be automatically terminated, and you’ll receive your score.
|
||||
There's no need to manually check if you've completed the maze!
|
||||
|
||||
### Example
|
||||
|
||||
A very short example
|
||||
|
||||
<details>
|
||||
<summary>stdin</summary>
|
||||
|
||||
```
|
||||
⬛⬛⬛⬛⬛
|
||||
⬛🍝⬜⬜⬛
|
||||
⬛⬛⬛⬜⬛
|
||||
⬛⬜⬜😮⬛
|
||||
⬛⬛⬛⬛⬛
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>stdout</summary>
|
||||
|
||||
`⬆️`
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>stdin</summary>
|
||||
|
||||
```
|
||||
⬛⬛⬛⬛⬛
|
||||
⬛🍝⬜⬜⬛
|
||||
⬛⬛⬛😮⬛
|
||||
⬛⬜⬜🟥⬛
|
||||
⬛⬛⬛⬛⬛
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>stdout</summary>
|
||||
|
||||
`⬆️`
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>stdin</summary>
|
||||
|
||||
```
|
||||
⬛⬛⬛⬛⬛
|
||||
⬛🍝⬜😮⬛
|
||||
⬛⬛⬛🟥⬛
|
||||
⬛⬜⬜🟥⬛
|
||||
⬛⬛⬛⬛⬛
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>stdout</summary>
|
||||
|
||||
`⬅️`
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>stdin</summary>
|
||||
|
||||
```
|
||||
⬛⬛⬛⬛⬛
|
||||
⬛🍝😮🟥⬛
|
||||
⬛⬛⬛🟥⬛
|
||||
⬛⬜⬜🟥⬛
|
||||
⬛⬛⬛⬛⬛
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>stdout</summary>
|
||||
|
||||
`⬅️`
|
||||
|
||||
</details>
|
||||
|
||||
You solved the puzzle!
|
||||
Your program gets killed and your receive your score.
|
||||
|
||||
## Minimum requirements
|
||||
|
||||
Your submission must meet these minimum requirements:
|
||||
|
||||
- The code must be written in Python 🐍.
|
||||
- It must solve the maze.
|
||||
- It must complete the maze within **10 seconds**.
|
||||
|
||||
Failure to meet these requirements will result in your submission being denied.
|
||||
|
||||
## Restrictions
|
||||
|
||||
There are a few restrictions:
|
||||
|
||||
- All your code must be contained in a single file.
|
||||
- The following Python packages are not allowed:
|
||||
- `sys`
|
||||
- `time`
|
||||
- `os`
|
||||
|
||||
We perform basic checks, so please do not attempt to circumvent these restrictions. Submissions that break the rules will be rejected.
|
||||
|
||||
## Submitting your code
|
||||
|
||||
Go to `https://spaghetti.zeus.gent`.
|
||||
Enter your name and select your code file.
|
||||
If your submission is accepted, you’ll see a GIF showing the result!
|
||||
|
||||
## Start
|
||||
|
||||
The file [maze.py](maze.py) is a starting point for your application.
|
||||
It contains all the required code for handling `stdin` and `stdout`, so you can focus on solving the maze.
|
||||
|
||||
The code file has comments (🤯) and is self-explanatory.
|
||||
We recommend using the classes and enums defined in [maze.py](maze.py) (or suffer some strange 👻 bugs)!
|
||||
|
||||
**Good Luck and if you need any help, don't hesitate to ask!**
|
Loading…
Reference in a new issue