Resolution conflits pour le merge avec persistance
continuous-integration/drone/push Build is failing Details

master
Loris OBRY 2 years ago
commit 72e85162ec

@ -1,7 +1,8 @@
using Model;
using Model.Classes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Emit;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Text;
@ -21,7 +22,16 @@ namespace ConsoleApp
Carte loup_garou = new Carte("Loup-Garou", "Il peut se reveiller chaque nuit pour voter avec les autres de son clan qui ils vont manger", "Il doit se faire passer pour un role du village, voter pour un de ses compagnons pour gagner la confiance peut etre un moyen", 4, "loup-garou", "Le loup-garou est un rôle très appréciable à jouer");
<<<<<<< HEAD
Carte voyante = new Carte("Voyante", "La voyante est capable de voir le role d'un joueur, et ce, chaque nuit", "Elle ne doit pas se faire découvrir, surtout en debut de partie, donner des indices subtiles sans braquer tout les soupçons des loup-garou vers vous est l'objectif", 4, "villageois", "Une carte tres interessante et difficile a la fois, ce role emmene souvent à faire des sacrifices");
=======
Utilisateur Kylian = new("Kyky", "12345", null);
Carte C = new("Villageois", "Aucuns", "Doit voter inteligemment", null, "lien", "une carte peu apprécié mais necesaire");
C.commentaires.Add(new Commentaire("Cette carte est la base du jeu, cool pour les debutants", Kylian ));
Pack P = new Pack("Jeu de base", "C'est la premiere version du jeu", 5);
Console.WriteLine(P.Nom);
Console.WriteLine(C.commentaires[0]);
>>>>>>> 0a7ee831209150d57559f3fd788a747cf8001bf5
string relativePath = "..\\..\\..\\Persistance";

@ -1,4 +1,4 @@
using Model;
using Model.Classes;
using System.Diagnostics;
namespace MauiApp1;

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model.Classes
{
public class Camp
{
public string Nom { get; set; }
public string Description { get; set; }
public string LienImage { get; set; }
public List<Carte> Cartes { get; set; }
public Camp(string Nom, string Description, string LienImage)
{
this.Nom = Nom;
this.Description = Description;
this.LienImage = LienImage;
Cartes = new List<Carte>();
}
}
}

@ -9,7 +9,7 @@ using System.Runtime.CompilerServices;
using System.Net.Http.Headers;
using System.Runtime.Serialization;
namespace Model
namespace Model.Classes
{
[DataContract(Name = "carte")]
public class Carte : INotifyPropertyChanged
@ -32,7 +32,8 @@ namespace Model
[DataMember]
public string Description {
get => description;
set {
set
{
description = value;
OnPropertyChanged(nameof(Description));
}
@ -88,10 +89,20 @@ namespace Model
OnPropertyChanged(nameof(LienImage));
}
}
public List<Commentaire> commentaires;
public List<Commentaire> Commentaires
{
get => commentaires;
set
{
commentaires = value;
OnPropertyChanged(nameof(Commentaires));
}
}
private string lienImage;
public Carte(string nom, string pouvoir, string strategie, int? note, string lienImage, string description)
{
this.nom = nom;
Nom = nom;
this.description = description;
this.pouvoir = pouvoir;
this.strategie = strategie;
@ -113,6 +124,7 @@ namespace Model
public bool Equals(Carte other)
{
return (this.nom == other.nom);
commentaires = new List<Commentaire>();
}
}
}

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model.Classes
{
public class Commentaire
{
public string Texte { get; set; }
public Utilisateur Proprietaire { get; set; }
public Commentaire(string Texte, Utilisateur Proprietaire)
{
this.Texte = Texte;
this.Proprietaire = Proprietaire;
}
}
}

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model.Classes
{
public interface IContenu
{
public string Nom { get; set; }
public string Description { get; set; }
public int? Note { get; set; }
}
}

@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model
namespace Model.Classes
{
public interface IDataManager
{

@ -6,7 +6,7 @@ using System.Threading.Tasks;
using System.Collections.ObjectModel;
using System.Data;
namespace Model
namespace Model.Classes
{
public class Manager : IDataManager
{

@ -0,0 +1,74 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace Model.Classes
{
public class Pack : IContenu, INotifyPropertyChanged
{
public event PropertyChangedEventHandler? PropertyChanged;
void OnPropertyChanged([CallerMemberName] string? propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
public string nom;
public string Nom
{
get => nom;
set
{
nom = value;
OnPropertyChanged(nameof(Nom));
}
}
public string description;
public string Description
{
get => description;
set
{
nom = value;
OnPropertyChanged(nameof(Description));
}
}
private int? note;
public int? Note
{
get
{
return note;
}
set
{
if (value < 0 || value > 10)
{
throw new ArgumentOutOfRangeException(nameof(value), "La valeur de la note doit être comprise entre 0 et 10.");
}
note = value;
OnPropertyChanged(nameof(Note));
}
}
public List<Commentaire> commentaires;
public List<Commentaire> Commentaires
{
get => commentaires;
set
{
commentaires = value;
OnPropertyChanged(nameof(Commentaires));
}
}
public Pack(string nom, string description, int? note)
{
this.nom = nom;
this.description = description;
this.note = note;
commentaires = new List<Commentaire>();
}
}
}

@ -7,7 +7,7 @@ using System.Threading.Tasks;
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace Model
namespace Model.Classes
{
public class Utilisateur : INotifyPropertyChanged
{
Loading…
Cancel
Save