Skip to content
Snippets Groups Projects
Commit c8c2bfe6 authored by SATTLER EMMA's avatar SATTLER EMMA
Browse files

Plus de problèmes (j'espère)

parent d5a55711
Branches
Tags
No related merge requests found
......@@ -50,7 +50,7 @@ namespace Wanderer.view
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.ForeColor = System.Drawing.Color.White;
this.button1.Location = new System.Drawing.Point(1050, 635);
this.button1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.button1.Margin = new System.Windows.Forms.Padding(2);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(184, 56);
this.button1.TabIndex = 0;
......@@ -92,7 +92,7 @@ namespace Wanderer.view
this.btnConstruction.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnConstruction.ForeColor = System.Drawing.Color.White;
this.btnConstruction.Location = new System.Drawing.Point(11, 295);
this.btnConstruction.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnConstruction.Margin = new System.Windows.Forms.Padding(2);
this.btnConstruction.Name = "btnConstruction";
this.btnConstruction.Size = new System.Drawing.Size(159, 63);
this.btnConstruction.TabIndex = 4;
......@@ -109,7 +109,7 @@ namespace Wanderer.view
this.btnContexte.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnContexte.ForeColor = System.Drawing.Color.White;
this.btnContexte.Location = new System.Drawing.Point(11, 213);
this.btnContexte.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnContexte.Margin = new System.Windows.Forms.Padding(2);
this.btnContexte.Name = "btnContexte";
this.btnContexte.Size = new System.Drawing.Size(159, 65);
this.btnContexte.TabIndex = 5;
......@@ -125,12 +125,12 @@ namespace Wanderer.view
this.button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button4.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button4.ForeColor = System.Drawing.Color.White;
this.button4.Location = new System.Drawing.Point(16, 510);
this.button4.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.button4.Location = new System.Drawing.Point(834, 635);
this.button4.Margin = new System.Windows.Forms.Padding(2);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(159, 50);
this.button4.Size = new System.Drawing.Size(164, 56);
this.button4.TabIndex = 6;
this.button4.Text = "Blabla randoneurs";
this.button4.Text = "Quitter";
this.button4.UseVisualStyleBackColor = false;
this.button4.Click += new System.EventHandler(this.button4_Click);
//
......@@ -143,7 +143,7 @@ namespace Wanderer.view
this.btnGagner.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnGagner.ForeColor = System.Drawing.Color.White;
this.btnGagner.Location = new System.Drawing.Point(11, 382);
this.btnGagner.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btnGagner.Margin = new System.Windows.Forms.Padding(2);
this.btnGagner.Name = "btnGagner";
this.btnGagner.Size = new System.Drawing.Size(159, 67);
this.btnGagner.TabIndex = 7;
......@@ -186,7 +186,7 @@ namespace Wanderer.view
this.Controls.Add(this.label1);
this.Controls.Add(this.button1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.Margin = new System.Windows.Forms.Padding(2);
this.Name = "FormAide";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Aide";
......
......@@ -55,9 +55,7 @@ namespace Wanderer.view
private void button4_Click(object sender, EventArgs e)
{
Button b = (Button)sender;
lblTitre.Text = b.Text;
Application.Exit();
}
private void btnGagner_Click(object sender, EventArgs e)
......
......@@ -15,7 +15,7 @@ namespace Wanderer.view
{
public partial class FormJeu : Form
{
int nombreTour;
int nombreTour=-1;
const int limiteRandonneur = 100;
const int limiteTerritoire = 200;
......@@ -53,7 +53,7 @@ namespace Wanderer.view
}
//Premier tour
if(nombreTour==1)
if(nombreTour==0)
{
b.Enabled = false;
b.BackColor = Color.Gray;
......@@ -88,8 +88,6 @@ namespace Wanderer.view
private void btn_Click(object sender, EventArgs e)
{
Game.Instance.currentPlayerIndex = (Game.Instance.currentPlayerIndex + 1) % Game.Instance.Players.Count;
Player currentPlayer = Game.Instance.Players[Game.Instance.currentPlayerIndex];
Button b = (Button)sender;
Int32 i = Convert.ToInt32(b.Tag);
......@@ -136,19 +134,21 @@ namespace Wanderer.view
lblTrain.Text = tbCouts[3].ToString();
lblUsine.Text = tbCouts[4].ToString();
lblTour.ForeColor = currentPlayer.Color;
if (Game.Instance.currentPlayerIndex == 0)
{
lblArgentRouge.Text = "Argent :" + currentPlayer.marks;
lblMarcheurRouge.Text = "Marcheurs : " + currentPlayer.randonneurs;
nombreTour++;
}
if (Game.Instance.currentPlayerIndex == 1)
{
lblArgentBleu.Text = "Argent :" + currentPlayer.marks;
lblMarcheurBleu.Text = "Marcheurs : " + currentPlayer.randonneurs;
lblTour.Text = "Nombre d'action : " + nombreTour++;
}
lblTour.Text = "Nombre d'action : " + nombreTour;
if (MapView.SelectedTile != null && MapView.SelectedTile.model.HasChanged)
......@@ -161,10 +161,16 @@ namespace Wanderer.view
if (currentPlayer.randonneurs >= 50)
{
FormFin f = new FormFin(currentPlayer);
FormFin f = new FormFin(currentPlayer,nombreTour);
f.Show();
this.Hide();
}
Game.Instance.currentPlayerIndex = (Game.Instance.currentPlayerIndex + 1) % Game.Instance.Players.Count;
currentPlayer = Game.Instance.Players[Game.Instance.currentPlayerIndex];
lblTour.ForeColor = currentPlayer.Color;
}
public void updateTailleTerritoire(int nombreClub, int nombreChemins, int nombreRefuges)
......@@ -192,6 +198,10 @@ namespace Wanderer.view
private void FormJeu_Load(object sender, EventArgs e)
{
mapView1.Model = new Map(20, 10);
lblArgentBleu.Text = "Argent :" + 50;
lblMarcheurBleu.Text = "Marcheurs : " + 0;
update();
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment