Feature/automautic room closing (#5)

* Room now closes when nobody is in the room

* cleanup
This commit is contained in:
DTieman
2023-03-24 14:33:37 +01:00
committed by GitHub
parent 0bddf64797
commit 78af43ad44
4 changed files with 39 additions and 48 deletions

View File

@@ -1,21 +0,0 @@
using MauMau_Server.Mau;
using Microsoft.AspNetCore.Mvc;
namespace MauMau_Server.Controllers;
[ApiController]
[Route("[controller]")]
public class MauController : 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());
}
}

View File

@@ -52,11 +52,4 @@ public class RoomController : ControllerBase
var id = _roomManager.CreateRoom();
return Ok(JsonSerializer.Serialize(id));
}
[HttpDelete]
public IActionResult Delete()
{
_roomManager.RemoveAllRooms();
return NoContent();
}
}