Skip to content
Snippets Groups Projects
Commit a417656c authored by Louis Greiner's avatar Louis Greiner
Browse files

Merge branch 'comm' of https://gitlab.utc.fr/girardta/lo23 into comm

parents 10261d39 ba22b792
No related branches found
No related tags found
6 merge requests!104devV2 comm,!62Feature - Rejoindre Partie,!61Modification de la classe Comm_calls_Data_Server_Impl afin que...,!53feat : Intégration IHM-Main,!52Dev,!45Comm
Showing
with 120 additions and 80 deletions
......@@ -396,3 +396,6 @@ FodyWeavers.xsd
# JetBrains Rider
*.sln.iml
# MacOS
.DS_Store
\ No newline at end of file
using Client.comm;
using Client.data;
using System;
using System.Collections.Generic;
using System.Configuration;
......@@ -14,11 +14,14 @@ namespace Client
/// </summary>
public partial class App : Application
{
private void App_Startup(object sender, StartupEventArgs e)
{
CommClient cli = new CommClient();
private DataCore dataCore;
private void App_Startup(object sender, StartupEventArgs e)
{
dataCore = new DataCore();
CommClient cli = new CommClient();
cli.start("127.0.0.1", 10000);
cli.announceUser("Bonjour");
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
......@@ -71,9 +71,10 @@
</Compile>
<Compile Include="comm\CommClient.cs" />
<Compile Include="data\Class1.cs" />
<Compile Include="data\Data_Client_ctrl.cs" />
<Compile Include="data\DataCore.cs" />
<Compile Include="data\Comm_calls_Data_Client_Impl.cs" />
<Compile Include="data\Data_Client_ctrl.cs" />
<Compile Include="data\2.cs" />
<Compile Include="data\IHM_Main_calls_Data_Client_Impl.cs" />
<Compile Include="data\Programtest.cs" />
<Compile Include="ihm-game\Class1.cs" />
......@@ -101,6 +102,7 @@
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="bin\Debug\Client.exe.config" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
......@@ -110,12 +112,18 @@
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<ProjectReference Include="..\Shared\Shared.csproj">
<Project>{deedb05f-755c-4573-a317-e84f11529284}</Project>
<Name>Shared</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Content Include="bin\Debug\Client.exe" />
<Content Include="bin\Debug\Client.pdb" />
<Content Include="bin\Debug\Shared.dll" />
<Content Include="bin\Debug\Shared.pdb" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
using System;
namespace Client.Data
{
public class Data_Client
{
private Comm_calls_Data_Client_impl implInterfaceForComm;
public Data_Client()
{
this.implInterfaceForComm = new Comm_calls_Data_Client_impl();
}
public Comm_calls_Data_Client_impl getImplInterfaceForComm()
{
return implInterfaceForComm;
}
}
}
using Shared.data;
using Shared.data;
using System;
using System.Collections.Generic;
using System.Data;
......@@ -8,16 +8,16 @@ namespace Client.Data
{
public class Comm_calls_Data_Client_impl : Shared.interfaces.Interface_Comm_calls_Data_Client
{
private List<LightUser> users = new List<LightUser>();
private List<LightUser> users = new List<LightUser>();
private List<LightGame> games = new List<LightGame>();
public Comm_calls_Data_Client_impl(){}
public void setGamesAndUsersList(List<LightUser> users, List<LightGame> games)
{
this.users = users;
this.games = games;
}
{
this.users = users;
this.games = games;
}
}
}
......@@ -23,7 +23,7 @@ namespace Client.data
{
//Association des vues et de leur view model
mainWindow.Show();
Console.WriteLine("hello bor");
}
}
......
using Client.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Client.Data
namespace Client.data
{
public class Data_Client
public class Data_Client_ctrl
{
private Comm_calls_Data_Client_impl implInterfaceForComm;
public Data_Client()
public Data_Client_ctrl()
{
this.implInterfaceForComm = new Comm_calls_Data_Client_impl();
}
public Comm_calls_Data_Client_impl getImplInterfaceForComm()
{
return implInterfaceForComm;
......
using System;
using Client.data;
//using user1;
public class IHM_Main_calls_Data_Client_Impl : Data_Client_ctrl
......@@ -8,7 +9,7 @@ public class IHM_Main_calls_Data_Client_Impl : Data_Client_ctrl
}
/*
Boolean authenticate(logint string, passwordt string)
{
int i = 0;
......@@ -25,6 +26,6 @@ public class IHM_Main_calls_Data_Client_Impl : Data_Client_ctrl
user = getLigthUserdeUser(login);
}
*/
}
......@@ -3,7 +3,7 @@
namespace network_test
{
class Program
{
{/*
static void Main(string[] args)
{
......@@ -20,7 +20,7 @@ namespace network_test
Console.WriteLine("hello nina ");
}
s
}
}*/
}
}
......@@ -12,11 +12,6 @@ namespace Server.Data
private static List<LightUser> users = new List<LightUser>();
private static List<LightGame> games = new List<LightGame>();
public Comm_calls_Data_Server_Impl()
{
}
public Comm_calls_Data_Server_Impl()
{
this.user = new LightUser();
......@@ -39,7 +34,7 @@ namespace Server.Data
{
foreach(LightUser user in users)
{
if(user.getIdJoueur() == idJoueur)
if(user.id == idJoueur)
{
users.Remove(user);
break;
......
......@@ -45,7 +45,7 @@
<Compile Include="data\LightGame.cs" />
<Compile Include="data\Round.cs" />
<Compile Include="data\GameAction.cs" />
<Compile Include="data\LigthUser.cs" />
<Compile Include="data\LightUser.cs" />
<Compile Include="data\Phase.cs" />
<Compile Include="data\Card.cs" />
<Compile Include="data\ChatMessage.cs" />
......
using System;
public class Card
namespace Shared.data
{
private int index;
private char color;
private int value;
private bool isInHand;
private bool isHidden;
public class Card
{
private int index;
private char color;
private int value;
private bool isInHand;
private bool isHidden;
}
}
using System;
public class ChatMessage
namespace Shared.data
{
private DateTime date;
private string sender; // username sera passé en paramètre
private string text;
private int idGame;
/* public Message(DateTime datet, string sendert, string textt, int idGamet)
public class ChatMessage
{
date = datet;
sender = sendert;
text = textt;
idGame = idGamet;
}*/
private DateTime date;
private string sender; // username sera passé en paramètre
private string text;
private int idGame;
/* public Message(DateTime datet, string sendert, string textt, int idGamet)
{
date = datet;
sender = sendert;
text = textt;
idGame = idGamet;
}*/
}
}
using System;
using Card;
public class Deck
namespace Shared.data
{
private int index;
private Card[] cards;
}
\ No newline at end of file
public class Deck
{
private int index;
private Card[] cards;
}
}
......@@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace Shared.data
{
class Game
public class Game
{
Round[] rounds { get; set; }
int turn { set; get; }
......
......@@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace Shared.data
{
enum GameStatus : ushort
public enum GameStatus : ushort
{
lobby = 0,
running = 1,
......@@ -14,7 +14,7 @@ namespace Shared.data
finished = 3
}
class LightGame
public class LightGame
{
int id { get; set; }
GameStatus status { get; set; }
......
......@@ -7,14 +7,14 @@ using System.Threading.Tasks;
namespace Shared.data
{
public class LigthUser
public class LightUser
{
public int id;
public int id { get; set; }
public string userName;// userName et login c'est la même chose
public string image;
public LigthUser(int idt = 1, string userNamet = "usernametest", string imaget = "imagetest")
public LightUser(int idt = 1, string userNamet = "usernametest", string imaget = "imagetest")
{
if (idt == 1) { id = idt; }
else
......
......@@ -18,9 +18,6 @@ namespace Shared.data
public class Phase
{
GameAction[] actions { set; get; }
}
}
\ No newline at end of file
using System;
using Card;
enum PlayerRole : ushort {
smallBlind = 1,
bigBlind = 2,
nothing = 3
}
public class Player
namespace Shared.data
{
private PlayerRole role;
private bool isFolded;
private int tokens;
private int tokensBet;
private Card[] hand;
}
enum PlayerRole : ushort
{
smallBlind = 1,
bigBlind = 2,
nothing = 3
}
public class Player
{
private PlayerRole role;
private bool isFolded;
private int tokens;
private int tokensBet;
private Card[] hand;
}
}
......@@ -3,11 +3,10 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Shared.data;
namespace Shared.data {
public class User : LigthUser
public class User : LightUser
{
public string password;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment