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

Quelques modifications FormJeu

parent 12df5f70
Branches
Tags
No related merge requests found
......@@ -42,6 +42,8 @@ namespace Wanderer.view
this.btnRefuge = new System.Windows.Forms.Button();
this.btnChemin = new System.Windows.Forms.Button();
this.btnClub = new System.Windows.Forms.Button();
this.lblArgentUp = new System.Windows.Forms.Label();
this.lblMarcheursUp = new System.Windows.Forms.Label();
this.mapView1 = new Wanderer.view.Controls.MapView();
((System.ComponentModel.ISupportInitialize)(this.pbAide)).BeginInit();
this.panel1.SuspendLayout();
......@@ -63,6 +65,8 @@ namespace Wanderer.view
//
// panel1
//
this.panel1.Controls.Add(this.lblMarcheursUp);
this.panel1.Controls.Add(this.lblArgentUp);
this.panel1.Controls.Add(this.lblMarcheur);
this.panel1.Controls.Add(this.lblArgent);
this.panel1.Controls.Add(this.lblTour);
......@@ -228,6 +232,25 @@ namespace Wanderer.view
this.btnClub.UseVisualStyleBackColor = false;
this.btnClub.Click += new System.EventHandler(this.btn_Click);
//
// lblArgentUp
//
this.lblArgentUp.AutoSize = true;
this.lblArgentUp.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
this.lblArgentUp.Location = new System.Drawing.Point(889, 27);
this.lblArgentUp.Name = "lblArgentUp";
this.lblArgentUp.Size = new System.Drawing.Size(0, 25);
this.lblArgentUp.TabIndex = 15;
this.lblArgentUp.Click += new System.EventHandler(this.lblArgentUp_Click);
//
// lblMarcheursUp
//
this.lblMarcheursUp.AutoSize = true;
this.lblMarcheursUp.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F);
this.lblMarcheursUp.Location = new System.Drawing.Point(1108, 24);
this.lblMarcheursUp.Name = "lblMarcheursUp";
this.lblMarcheursUp.Size = new System.Drawing.Size(0, 25);
this.lblMarcheursUp.TabIndex = 16;
//
// mapView1
//
this.mapView1.AutoScroll = true;
......@@ -292,5 +315,7 @@ namespace Wanderer.view
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label lblMarcheur;
private System.Windows.Forms.Label lblArgent;
private System.Windows.Forms.Label lblMarcheursUp;
private System.Windows.Forms.Label lblArgentUp;
}
}
\ No newline at end of file
......@@ -25,6 +25,7 @@ namespace Wanderer.view
const int limiteTerritoire = 200;
int[] tbCouts = new int[] { 30, 10, 15, 10, 60 }; //Refuge,Chemin,Club,Train,Usine
int[] tbGains = new int[] { 5, 0, 0, 0, 10 };
int[] tbRandonneur = new[] { 3, 2, 6, 0, -10 };
int[] tbConstruct = new int[]{0, 0, 0, 0, 0}; //Refuge,Chemin,Club,Train,Usine
......@@ -83,6 +84,7 @@ namespace Wanderer.view
Button b = (Button)sender;
Int32 i = Convert.ToInt32(b.Tag);
int cout = tbCouts[i];
int gain = tbGains[i];
//Calcul des marks et randonneurs, ajout d'image sur la map
if (marks >= cout && MapView.SelectedTile.model.Improvement == 0)
......@@ -100,13 +102,31 @@ namespace Wanderer.view
{
bonusCl += 2;
}
marks -= cout-10;
marks -= cout-gain-10;
randonneurs += tbRandonneur[i]+bonusCh+bonusCl;
if (randonneurs < 0)
{
randonneurs = 0;
}
update();
update();
}
}
private static void TimerEventProcessor(Object myObject,
EventArgs myEventArgs)
{
if (myTimer.Interval < 3000)
{
// Restarts the timer and increments the counter.
alarmCounter += 1;
myTimer.Enabled = true;
}
else
{
// Stops the timer.
exitFlag = true;
}
}
......@@ -115,8 +135,8 @@ namespace Wanderer.view
**/
private void update()
{
lblArgent.Text = "Argent :" + marks;
lblMarcheur.Text = "Marcheurs : " + randonneurs;
lblArgent.Text = " :" + marks;
lblMarcheur.Text = " : " + randonneurs;
lblTour.Text = "Nombre d'action : " + nombreTour++;
if (MapView.SelectedTile != null && MapView.SelectedTile.model.HasChanged)
{
......@@ -215,7 +235,9 @@ namespace Wanderer.view
}
private void lblArgentUp_Click(object sender, EventArgs e)
{
}
}
}
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