21 lines
503 B
C#
21 lines
503 B
C#
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());
|
|
}
|
|
} |