diff --git a/view/FormFin.Designer.cs b/view/FormFin.Designer.cs index 17e0bf7ef35bad33aca17e86ceb8072a313b534d..90e5ab5aae6466a5b4d8694ade551dd57d8cdfc7 100644 --- a/view/FormFin.Designer.cs +++ b/view/FormFin.Designer.cs @@ -32,9 +32,10 @@ namespace Wanderer.view System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormFin)); this.label1 = new System.Windows.Forms.Label(); this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); - this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); this.lblWinner = new System.Windows.Forms.Label(); + this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); this.lblLooser = new System.Windows.Forms.Label(); + this.lblTour = new System.Windows.Forms.Label(); this.flowLayoutPanel1.SuspendLayout(); this.flowLayoutPanel2.SuspendLayout(); this.SuspendLayout(); @@ -46,7 +47,7 @@ namespace Wanderer.view this.label1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 30F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label1.ForeColor = System.Drawing.Color.White; - this.label1.Location = new System.Drawing.Point(129, 42); + this.label1.Location = new System.Drawing.Point(110, 42); this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(363, 46); @@ -57,19 +58,12 @@ namespace Wanderer.view // flowLayoutPanel1 // this.flowLayoutPanel1.Controls.Add(this.lblWinner); + this.flowLayoutPanel1.Font = new System.Drawing.Font("Microsoft Tai Le", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.flowLayoutPanel1.Location = new System.Drawing.Point(65, 126); this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(236, 293); + this.flowLayoutPanel1.Size = new System.Drawing.Size(236, 115); this.flowLayoutPanel1.TabIndex = 1; // - // flowLayoutPanel2 - // - this.flowLayoutPanel2.Controls.Add(this.lblLooser); - this.flowLayoutPanel2.Location = new System.Drawing.Point(383, 126); - this.flowLayoutPanel2.Name = "flowLayoutPanel2"; - this.flowLayoutPanel2.Size = new System.Drawing.Size(235, 293); - this.flowLayoutPanel2.TabIndex = 2; - // // lblWinner // this.lblWinner.AutoSize = true; @@ -80,6 +74,15 @@ namespace Wanderer.view this.lblWinner.TabIndex = 0; this.lblWinner.Text = "label2"; // + // flowLayoutPanel2 + // + this.flowLayoutPanel2.Controls.Add(this.lblLooser); + this.flowLayoutPanel2.Font = new System.Drawing.Font("Microsoft Tai Le", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.flowLayoutPanel2.Location = new System.Drawing.Point(383, 126); + this.flowLayoutPanel2.Name = "flowLayoutPanel2"; + this.flowLayoutPanel2.Size = new System.Drawing.Size(235, 115); + this.flowLayoutPanel2.TabIndex = 2; + // // lblLooser // this.lblLooser.AutoSize = true; @@ -90,16 +93,31 @@ namespace Wanderer.view this.lblLooser.TabIndex = 0; this.lblLooser.Text = "label3"; // + // lblTour + // + this.lblTour.AutoSize = true; + this.lblTour.BackColor = System.Drawing.Color.Transparent; + this.lblTour.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.lblTour.Font = new System.Drawing.Font("Microsoft Sans Serif", 30F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblTour.ForeColor = System.Drawing.Color.White; + this.lblTour.Location = new System.Drawing.Point(106, 301); + this.lblTour.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.lblTour.Name = "lblTour"; + this.lblTour.Size = new System.Drawing.Size(406, 46); + this.lblTour.TabIndex = 3; + this.lblTour.Text = "Nombre de tour total :"; + // // FormFin // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage"))); this.ClientSize = new System.Drawing.Size(675, 457); + this.Controls.Add(this.lblTour); this.Controls.Add(this.flowLayoutPanel2); this.Controls.Add(this.flowLayoutPanel1); this.Controls.Add(this.label1); - this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.Margin = new System.Windows.Forms.Padding(2); this.Name = "FormFin"; this.Text = "Fin"; this.flowLayoutPanel1.ResumeLayout(false); @@ -118,5 +136,6 @@ namespace Wanderer.view private System.Windows.Forms.Label lblWinner; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2; private System.Windows.Forms.Label lblLooser; + private System.Windows.Forms.Label lblTour; } } \ No newline at end of file diff --git a/view/FormFin.cs b/view/FormFin.cs index 05dd0d73378add6d57a07f541958cbc15a639300..9dbf6570fb6513cf4c59ac1e140de1007d08c789 100644 --- a/view/FormFin.cs +++ b/view/FormFin.cs @@ -15,17 +15,21 @@ namespace Wanderer.view { public partial class FormFin : Form { - public FormFin(Player currentPlayer) + public FormFin(Player currentPlayer, int nombreTour) { InitializeComponent(); if (currentPlayer.Color == Color.Brown) { label1.Text = "Le joueur Rouge a gagné !"; + label1.BackColor = currentPlayer.Color; } else { label1.Text = "Le joueur Bleu a gagné !"; + label1.BackColor = currentPlayer.Color; } + + lblTour.Text = lblTour.Text + nombreTour; afficheResultat(currentPlayer); } diff --git a/view/FormJeu.cs b/view/FormJeu.cs index 6325440acca953aea8c2a567990a683f07d8211f..1a6be401b9b4d33c48bd309031bd5d7e879a5a08 100644 --- a/view/FormJeu.cs +++ b/view/FormJeu.cs @@ -159,7 +159,7 @@ namespace Wanderer.view } updateButtons(); - if (currentPlayer.randonneurs >= 50) + if (currentPlayer.randonneurs >= 3) { FormFin f = new FormFin(currentPlayer,nombreTour); f.Show();