Files
snake2025/README.md
2025-03-26 10:10:36 +01:00

70 lines
2.0 KiB
Markdown

# House Drawing Program
[![en](https://img.shields.io/badge/lang-en-red.svg)](https://git.esiee.fr/frequela/snake2025/-/blob/tp1/README.md)
[![fr](https://img.shields.io/badge/lang-fr-green.svg)](https://git.esiee.fr/frequela/snake2025/-/blob/tp1/README-fr.md)
This program draws a simple house with a red square for the main wall, a blue triangle for the roof, colored rectangles for the windows, and a yellow circle for the sun using the MLV graphics library.
## Features
- Draws a red square as the main wall of the house.
- Draws a blue triangle as the roof of the house.
- Draws two colored rectangles as the windows of the house.
- Draws a brown rectangle as the door of the house.
- Draws a yellow circle as the sun.
- Displays a message "Press ESC to quit" and waits for the user to press the ESC key to close the window.
## Dependencies
- GCC (GNU Compiler Collection)
- MLV (Mini Library for Visualization)
## Installation
### Installing MLV on Ubuntu
1. Update your package list and install the required packages:
```sh
sudo apt-get update
sudo apt-get install build-essential gcc make libmlv3-dev
```
### Building the Program
1. Clone the repository or download the source code.
2. Navigate to the directory containing the `Makefile` and `maison.c`.
3. Run the following command to build the program:
```sh
make
```
This will compile `maison.c` and create an executable named `maison`.
## Usage
1. After building the program, run the executable:
```sh
./maison
```
2. A window will open displaying the house and the sun. Press the ESC key to close the window.
## Cleaning Up
To clean up the build files, run:
```sh
make clean
```
This will remove the object files and the executable.
## License
This project is licensed under the GPLv3 License. For more details, see [GPLv3 License](https://www.gnu.org/licenses/gpl-3.0.en.html).
## Authors
- Alex Frequelin (light_emerald@aostia.com)
## Acknowledgments
- Adrien Boussicault and Marc Zipstein for the MLV library.
- ESIEE Paris for the course materials and guidance.