No description
This repository has been archived on 2026-06-11. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • C 89.5%
  • JavaScript 4.6%
  • CMake 4.2%
  • HTML 0.7%
  • CSS 0.6%
  • Other 0.4%
Find a file
2025-04-27 23:34:28 +02:00
ressources Replace empty.png 2025-04-27 13:14:41 +02:00
web correction affichage 2025-04-27 23:34:28 +02:00
.clang-format Clang + modification des fonctions dans game.c pour enlever tous les DEFAULT_SIZE hors de game_new 2024-12-04 13:44:24 +01:00
.gitignore Ajout fonction game_load 2025-01-31 20:25:41 +01:00
CMakeLists.txt ajout sdl to cmake and make it work 2025-03-17 16:23:56 +01:00
game.c Oubli 2025-03-14 17:45:21 +01:00
game.h Commit Initial du TD07 2024-12-02 10:40:15 +00:00
game_aux.c Optimisation supplémentaire 2025-03-16 16:11:58 +01:00
game_aux.h Rectification game_delete, game_default, game_default_solution 2024-11-18 11:45:03 +01:00
game_ext.c Modifications: tentative retrouver memory leaks 2025-03-14 17:42:51 +01:00
game_ext.h Commit Initial du TD07 2024-12-02 10:40:15 +00:00
game_random.c Oubli clang 2025-02-11 12:18:46 +01:00
game_sdl.c pauline a retirer empty 2025-03-30 13:40:54 +00:00
game_sdl.h modif sur l'oganisation des fichiers 2025-03-11 23:55:04 +00:00
game_solve.c Optimisation de game_is_connected 2025-03-16 11:16:53 +01:00
game_struct.h Modification structure history + changement game_equal 2025-01-11 15:56:29 +01:00
game_test_archaminade.c regler les probleme de memcheck 2025-03-13 12:54:34 +00:00
game_test_niclespinass.c regler les probleme de memcheck 2025-03-13 12:54:34 +00:00
game_test_pricaud.c Optimisation de game_is_connected 2025-03-16 11:16:53 +01:00
game_text.c Modification TD10 et implémentation TD11 2025-02-11 12:16:09 +01:00
game_tools.c Tout ça pour enlever un print :') 2025-03-16 16:13:56 +01:00
game_tools.h Modification TD10 et implémentation TD11 2025-02-11 12:16:09 +01:00
README.md re-re-update README 2025-03-30 15:03:30 +02:00
sdl2.cmake ajout sdl to cmake and make it work 2025-03-17 16:23:56 +01:00

Net

Rules

The game net is a single-player logic puzzle.

The game consists of a 5x5 grid with squares containing pieces, comparable to cables or pipes, which can be rotated by a quarter turn in the clockwise (or anti-clockwise) direction. These pieces have a certain shape (endpoint, segment, corner, or tee) and a certain orientation (N, E, S, W). Each shape consists of one or more arms, connected to the center of the square, called half-edges.

By convention, here is the representation of the pieces based on their shape and orientation that we will use.

Here is the text representation of the pieces, to allow for display in a Linux terminal.

|          |  N  |  E  |  S  |  W  |
| -------- | --- | --- | --- | --- |
| endpoint |  ^  |  >  |  v  |  <  |
| segment  |  |  |  -  |  |  |  -  |
| corner   |  └  |  ┌  |  ┐  |  ┘  |
| tee      |  ┴  |  ├  |  ┬  |  ┤  |

Here is a representation of the pieces with textures, those will be displayed with an SDL renderer.

Original Rule: According to the Simon Tatham's Portable Puzzle Collection, the game rule is simply stated as follows: Rotate the pieces in the grid squares so that they come together in a single connected network, without loops.

You can try the original game here.

Indeed, by rotating the pieces, it is possible to correctly match the half-edges of two adjacent squares, so that they connect the centers of the squares (or vertices), forming an edge.

Project Architecture

Our project is based on a single library named game library (libgame.a), whose interface is divided into several header files:

  • Basic Game Functions: @ref game.h
  • Auxiliary Game Functions: @ref game_aux.h
  • Extended Game Functions: @ref game_ext.h

This interface manipulates an opaque data type, that is the structure @ref game, by means of pointers or const pointers (@ref cgame).

About Const Pointer:

Based on this library, our project will provide several programs, including but not limited to the following:

  • game_text: a simple text-based program to play our game in a terminal ;
  • game_test_XXX: 3 program with many tests to check the validity of the library functions ;
  • game_sdl: a program made to play our game on a SDL renderer with textures

Authors

This project is made by 3 person

Nicolas Lespinasse
Pauline Ricaud
Arthur Chaminade