1st json over websocket test

This commit is contained in:
2023-03-16 15:20:28 +01:00
parent 405a14ad28
commit 4f85f6f793
7 changed files with 181 additions and 5 deletions

View File

@@ -0,0 +1,21 @@
using MauMau_Server.Mau;
using Microsoft.AspNetCore.Mvc;
namespace MauMau_Server.Controllers;
[ApiController]
[Route("[controller]")]
public class DeckController : ControllerBase
{
[HttpGet("deck")]
public IActionResult GetDeck()
{
return Ok(new Deck().GetUnusedDeck().Select(card => card.ToString()).ToList());
}
[HttpGet("hand")]
public IActionResult GetHand()
{
return Ok(new Deck().DrawCards(8).Select(card => card.ToString()).ToList());
}
}