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

Fixing code issues

parent ba3ebb4d
No related branches found
No related tags found
4 merge requests!50Daroldju/fix/method signature in interfaces,!43Daroldju/fix/method signature in interfaces,!39Sylvain/feature/correction type,!36Data
...@@ -12,11 +12,6 @@ namespace Server.Data ...@@ -12,11 +12,6 @@ namespace Server.Data
private static List<LightUser> users = new List<LightUser>(); private static List<LightUser> users = new List<LightUser>();
private static List<LightGame> games = new List<LightGame>(); private static List<LightGame> games = new List<LightGame>();
public Comm_calls_Data_Server_Impl()
{
}
public Comm_calls_Data_Server_Impl() public Comm_calls_Data_Server_Impl()
{ {
this.user = new LightUser(); this.user = new LightUser();
...@@ -39,7 +34,7 @@ namespace Server.Data ...@@ -39,7 +34,7 @@ namespace Server.Data
{ {
foreach(LightUser user in users) foreach(LightUser user in users)
{ {
if(user.getIdJoueur() == idJoueur) if(user.id == idJoueur)
{ {
users.Remove(user); users.Remove(user);
break; break;
......
using System; using System;
public class Card namespace Shared.data
{ {
private int index; public class Card
private char color; {
private int value; private int index;
private bool isInHand; private char color;
private bool isHidden; private int value;
private bool isInHand;
private bool isHidden;
}
} }
using System; using System;
public class ChatMessage namespace Shared.data
{ {
private DateTime date; public class ChatMessage
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; private DateTime date;
sender = sendert; private string sender; // username sera passé en paramètre
text = textt; private string text;
idGame = idGamet; private int idGame;
}*/
/* public Message(DateTime datet, string sendert, string textt, int idGamet)
{
date = datet;
sender = sendert;
text = textt;
idGame = idGamet;
}*/
}
} }
using System; using System;
using static Card;
public class Deck namespace Shared.data
{ {
private int index; public class Deck
private Card[] cards; {
} private int index;
\ No newline at end of file private Card[] cards;
}
}
...@@ -6,7 +6,7 @@ using System.Threading.Tasks; ...@@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace Shared.data namespace Shared.data
{ {
class Game public class Game
{ {
Round[] rounds { get; set; } Round[] rounds { get; set; }
int turn { set; get; } int turn { set; get; }
......
...@@ -14,7 +14,7 @@ namespace Shared.data ...@@ -14,7 +14,7 @@ namespace Shared.data
finished = 3 finished = 3
} }
public class LightGame public class LightGame
{ {
int id { get; set; } int id { get; set; }
GameStatus status { get; set; } GameStatus status { get; set; }
......
...@@ -10,7 +10,7 @@ namespace Shared.data ...@@ -10,7 +10,7 @@ namespace Shared.data
public class LightUser 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 userName;// userName et login c'est la même chose
public string image; public string image;
......
...@@ -18,9 +18,6 @@ namespace Shared.data ...@@ -18,9 +18,6 @@ namespace Shared.data
public class Phase public class Phase
{ {
GameAction[] actions { set; get; } GameAction[] actions { set; get; }
} }
} }
\ No newline at end of file
using System; using System;
using static Card;
enum PlayerRole : ushort { namespace Shared.data
smallBlind = 1,
bigBlind = 2,
nothing = 3
}
public class Player
{ {
private PlayerRole role; enum PlayerRole : ushort
private bool isFolded; {
private int tokens; smallBlind = 1,
private int tokensBet; bigBlind = 2,
private Card[] hand; nothing = 3
} }
public class Player
{
private PlayerRole role;
private bool isFolded;
private int tokens;
private int tokensBet;
private Card[] hand;
}
}
...@@ -3,7 +3,6 @@ using System.Collections.Generic; ...@@ -3,7 +3,6 @@ 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 Shared.data;
namespace Shared.data { namespace Shared.data {
......
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