From abd0c5fdbafa2d3af41f601431dea0adcf92e322 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20LAVERGNE?= Date: Sat, 6 Apr 2024 08:41:06 +0200 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=9A=A7=20Cr=C3=A9ation=20de=20la=20cl?= =?UTF-8?q?asse=20pour=20les=20cellules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/Trek-12/Models/Cell.cs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 source/Trek-12/Models/Cell.cs diff --git a/source/Trek-12/Models/Cell.cs b/source/Trek-12/Models/Cell.cs new file mode 100644 index 0000000..6bd75ef --- /dev/null +++ b/source/Trek-12/Models/Cell.cs @@ -0,0 +1,8 @@ +namespace Models; + +public class Cell +{ + private double x; + private double y; + private string back; +} \ No newline at end of file From 49a260c487dd4969ee67fcf52baaef5fc27350b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20LAVERGNE?= Date: Mon, 8 Apr 2024 14:25:21 +0200 Subject: [PATCH 2/2] =?UTF-8?q?Ajout=20de=20l'h=C3=A9ritage=20pour=20la=20?= =?UTF-8?q?classe=20Cell?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/Trek-12/Models/Cell.cs | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/source/Trek-12/Models/Cell.cs b/source/Trek-12/Models/Cell.cs index 6bd75ef..182876a 100644 --- a/source/Trek-12/Models/Cell.cs +++ b/source/Trek-12/Models/Cell.cs @@ -1,8 +1,22 @@ namespace Models; -public class Cell +public class Cell : Position { - private double x; - private double y; - private string back; + private int value; + public int Value + { + get => value; + set => value = value; + } + + private string background; + public string Background + { + get => background; + set => background = value; + } + + public Cell(int x, int y) : base(x, y) + { + } } \ No newline at end of file