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
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;
......
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 static 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; }
......
......@@ -14,7 +14,7 @@ namespace Shared.data
finished = 3
}
public class LightGame
public class LightGame
{
int id { get; set; }
GameStatus status { get; set; }
......
......@@ -10,7 +10,7 @@ namespace Shared.data
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;
......
......@@ -18,9 +18,6 @@ namespace Shared.data
public class Phase
{
GameAction[] actions { set; get; }
}
}
\ No newline at end of file
using System;
using static 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,7 +3,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using 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