dev/mangerAffilee
parent 1790b8c68a
commit 77bb10f262

@ -33,7 +33,7 @@ joueur2.EntrerPlayerName();
if (partie.JoueurCourrant == null)
{ partie.JoueurCourrant = joueur1; }
int longueur= 40;
joueur1.AfficherPlayerName();
Console.WriteLine(" commence !");
partie.Plateau.AfficherPlateau();
@ -42,7 +42,6 @@ while (partie.Agagner()==0)
{
partie.Plateau.MovePawn(partie.JoueurCourrant);
partie.Plateau.AfficherPlateau();
if (partie.Agagner() == 1 || partie.Agagner()== 2)
{

@ -2,6 +2,7 @@
using Models.Jeux.Plateau;
using System;
using System.Collections.Generic;
using System.ComponentModel.Design;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@ -141,6 +142,44 @@ namespace Models
Pion p1 = args.plateau.recherchePion(c1);
verif = args.plateau.deplacer(p1, c2,args.j);
Case cBG = args.plateau.rechercheCase(yc - 1, xc - 1);
Case cHG = args.plateau.rechercheCase(yc - 1, xc + 1);
Case cBD = args.plateau.rechercheCase(yc + 1, xc - 1);
Case cHD = args.plateau.rechercheCase(yc + 1, xc + 1);
if ( cHG.Pion == true)
{
Case cHGHG = args.plateau.rechercheCase(yc - 1, xc + 1);
if( cHGHG.Pion == false)
{
faireCoup(sender, args);
}
}
if ( cBD.Pion == true)
{
Case cBDBD = args.plateau.rechercheCase(yc + 1, xc - 1);
if (cBDBD.Pion == false)
{
faireCoup(sender, args);
}
}
if( cHD.Pion == true)
{
Case cHDHD = args.plateau.rechercheCase(yc + 1, xc + 1);
if (cHDHD.Pion == false)
{
faireCoup(sender, args);
}
}
if ( cBG.Pion == true)
{
Case cBGBG = args.plateau.rechercheCase(yc - 1, xc - 1);
if (cBGBG.Pion == false)
{
faireCoup(sender, args);
}
}
if(verif==false)
{
Console.WriteLine("Erreur déplacement non valide veuillez recommencer!");

Loading…
Cancel
Save