getting closer to models

This commit is contained in:
Ryan Peters
2023-04-04 22:47:05 -04:00
parent 281608beeb
commit 0896feb367
15 changed files with 108 additions and 2051 deletions

View File

@ -5,4 +5,4 @@ public class Card
public Guid Id { get; set; }
public Suit Suit { get; set; }
public string Value { get; set; }
}
}

View File

@ -3,6 +3,6 @@ namespace Sequence.Entities;
public class Hand
{
public Guid Id { get; set; }
public User User { get; set; }
//public Player Player { get; set; }
public ICollection<Card> Cards { get; set; }
}

8
Entities/HandCard.cs Normal file
View File

@ -0,0 +1,8 @@
namespace Sequence.Entities;
public class HandCard
{
public Guid Id { get; set; }
public Player Player { get; set; }
public Card Card { get; set; }
}

View File

@ -6,4 +6,5 @@ public class Match
public DateTime Created { get; set; }
public Player PlayerOne { get; set; }
public Player PlayerTwo { get; set; }
public ICollection<MatchCard> Deck { get; set; }
}

9
Entities/MatchCard.cs Normal file
View File

@ -0,0 +1,9 @@
namespace Sequence.Entities;
public class MatchCard
{
public Guid Id { get; set; }
public Match Match { get; set; }
public Card Card { get; set; }
public int Order { get; set; }
}

View File

@ -4,6 +4,7 @@ public class Player
{
public Guid Id { get; set; }
public User User { get; set; }
public Hand Hand { get; set; }
//public Hand Hand { get; set; }
public ICollection<HandCard> HandCards { get; set; }
public ICollection<PlayerCard> PlayerCards { get; set; }
}

View File

@ -3,6 +3,7 @@ namespace Sequence.Entities;
public class PlayerCard
{
public Guid Id { get; set; }
public Player Player { get; set; }
public Card Card { get; set; }
public int PositionX { get; set; }
public int PositionY { get; set; }