From b6f427d62995e9200c04ab253c8f59d69d8e49b9 Mon Sep 17 00:00:00 2001 From: Ryan Peters Date: Fri, 7 Apr 2023 15:06:22 -0400 Subject: [PATCH] working on board view --- Controllers/HomeController.cs | 14 ++++++++++++++ Models/BoardViewModel.cs | 6 ++++++ Views/Home/board.cshtml | 4 ++++ 3 files changed, 24 insertions(+) create mode 100644 Models/BoardViewModel.cs create mode 100644 Views/Home/board.cshtml diff --git a/Controllers/HomeController.cs b/Controllers/HomeController.cs index a7fcdcc..3458b01 100644 --- a/Controllers/HomeController.cs +++ b/Controllers/HomeController.cs @@ -22,6 +22,20 @@ public class HomeController : Controller return View(); } + public IActionResult Board() + { + var userId = Guid.Parse("08db379a-5de8-420d-8232-1bb60fdf249b"); + + var match = dbContext.Matches + .OrderByDescending(m => m.Created) + .FirstOrDefault(m => m.PlayerOne.UserId == userId || m.PlayerTwo.UserId == userId); + + if (match != null) + { + + } + } + public async Task CreateMatch(Guid userOneGuid, Guid userTwoGuid) { var playerOne = new Player diff --git a/Models/BoardViewModel.cs b/Models/BoardViewModel.cs new file mode 100644 index 0000000..0741452 --- /dev/null +++ b/Models/BoardViewModel.cs @@ -0,0 +1,6 @@ +namespace Sequence.Models; + +public class BoardViewModel +{ + +} \ No newline at end of file diff --git a/Views/Home/board.cshtml b/Views/Home/board.cshtml new file mode 100644 index 0000000..673cb7a --- /dev/null +++ b/Views/Home/board.cshtml @@ -0,0 +1,4 @@ +@{ + ViewData["Title"] = "Board"; +} +