Supprimme les fichiers donne en exemple

This commit is contained in:
Fred Z 2018-02-19 00:36:08 +01:00
parent c25cf45777
commit 778962b183
3 changed files with 0 additions and 56 deletions

View File

@ -1,14 +0,0 @@
# -*-coding:Utf-8 -*
"""Ce module contient la classe Carte."""
class Carte:
"""Objet de transition entre un fichier et un labyrinthe."""
def __init__(self, nom, chaine):
self.nom = nom
self.labyrinthe = creer_labyrinthe_depuis_chaine(chaine)
def __repr__(self):
return "<Carte {}>".format(self.nom)

View File

@ -1,12 +0,0 @@
# -*-coding:Utf-8 -*
"""Ce module contient la classe Labyrinthe."""
class Labyrinthe:
"""Classe représentant un labyrinthe."""
def __init__(self, robot, obstacles):
self.robot = robot
self.grille = {}
# ...

View File

@ -1,30 +0,0 @@
# -*-coding:Utf-8 -*
"""Ce fichier contient le code principal du jeu.
Exécutez-le avec Python pour lancer le jeu.
"""
import os
from carte import Carte
# On charge les cartes existantes
cartes = []
for nom_fichier in os.listdir("cartes"):
if nom_fichier.endswith(".txt"):
chemin = os.path.join("cartes", nom_fichier)
nom_carte = nom_fichier[:-3].lower()
with open(chemin, "r") as fichier:
contenu = fichier.read()
# Création d'une carte, à compléter
# On affiche les cartes existantes
print("Labyrinthes existants :")
for i, carte in enumerate(cartes):
print(" {} - {}".format(i + 1, carte.nom))
# Si il y a une partie sauvegardée, on l'affiche, à compléter
# ... Complétez le programme ...