Skip to content
Snippets Groups Projects
Commit 89cab2af authored by Pierre Roussel's avatar Pierre Roussel
Browse files

Merge branch 'data' into 'dev'

Merging 'data' into 'dev'

See merge request !40
parents 9633b782 94eebe9b
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,!40Merging 'data' into 'dev'
...@@ -3,6 +3,7 @@ using System.Collections.Generic; ...@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Drawing;
namespace Shared.data namespace Shared.data
{ {
...@@ -10,20 +11,20 @@ namespace Shared.data ...@@ -10,20 +11,20 @@ namespace Shared.data
public class LightUser public class LightUser
{ {
public int id { get; set; } public int id { get; private set; }
public string userName;// userName et login c'est la même chose public string username { get; set; } // username et login c'est la même chose
public string image; public string image { get; set; }
public LightUser(int idt = 1, string userNamet = "usernametest", string imaget = "imagetest") public LightUser() {}
{
if (idt == 1) { id = idt; } public LightUser(
else int id,
{ string username,
// id = Guid.NewGuid(); // ou Guid.NewGuid().ToString() string image
id = 1; ) {
} this.id = id;
userName = userNamet; this.username = username;
image = imaget; this.image = image;
} }
} }
} }
\ No newline at end of file
...@@ -14,10 +14,14 @@ namespace Shared.data ...@@ -14,10 +14,14 @@ namespace Shared.data
reveal = 4 reveal = 4
} }
public class Phase public class Phase
{ {
GameAction[] actions { set; get; } public List<GameAction> actions { set; get; }
public Phase()
{
this.actions = new List<GameAction>();
}
} }
} }
\ No newline at end of file
using System; using System;
using System.Collections.Generic;
namespace Shared.data namespace Shared.data
{ {
enum PlayerRole : ushort enum PlayerRole
{ {
smallBlind = 1, smallBlind,
bigBlind = 2, bigBlind,
nothing = 3 nothing,
} }
public class Player public class Player
{ {
private PlayerRole role; public string role { get; set; }
private bool isFolded; public bool isFolded { get; set; }
private int tokens; public int tokens { get; set; }
private int tokensBet; public int tokensBet { get; set; }
private Card[] hand; public List<Card> hand { get; set; }
public Player(int tokens)
{
this.role = PlayerRole.nothing.ToString();
this.isFolded = false;
this.tokens = tokens;
this.tokensBet = 0;
this.hand = new List<Card>();
}
} }
} }
...@@ -6,13 +6,13 @@ using System.Threading.Tasks; ...@@ -6,13 +6,13 @@ using System.Threading.Tasks;
namespace Shared.data namespace Shared.data
{ {
class Round public class Round
{ {
Phase[] phases { get; set; } public List<Phase> phases { get; set; }
public Round(Phase[] phases) public Round()
{ {
this.phases = phases; this.phases = new List<Phase>();
} }
} }
} }
...@@ -8,24 +8,28 @@ namespace Shared.data { ...@@ -8,24 +8,28 @@ namespace Shared.data {
public class User : LightUser public class User : LightUser
{ {
public string password; public string password { get; set; }
public bool status { get; set; }
public bool status; public string firstname { get; private set; } // Once creted the user should not be able to change his firstname
public string firstname; public string lastname { get; private set; } // Once creted the user should not be able to change his lastname
public int age; public int age { get; private set; } // Once creted the user should not be able to change his age
public User(
int id,
public User(int idt ,string imaget , string userNamet, string passwordt, bool statust, string firstnamet, int aget) string username,
string image,
string password,
bool status,
string firstname,
string lastname,
int age
) : base(id, username, image)
{ {
id = idt; this.password = password;
image = imaget; this.status = status;
this.firstname = firstname;
userName = userNamet; this.lastname = lastname;
password = passwordt; this.age = age;
status = statust;
firstname = firstnamet;
age = aget;
} }
} }
......
...@@ -5,7 +5,7 @@ using System.Text; ...@@ -5,7 +5,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Shared.interfaces namespace Shared.interfaces
{ {
public interface Interface_Comm_calls_Data_Client public interface Interface_Comm_calls_Data_Client
{ {
......
...@@ -5,7 +5,7 @@ using System.Text; ...@@ -5,7 +5,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Shared.interfaces namespace Shared.interfaces
{ {
public interface Interface_Comm_calls_Data_Server public interface Interface_Comm_calls_Data_Server
{ {
......
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