using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace WebApplication1.Controllers { [Route("api/v1/[controller]")] [ApiController] public class FieldController : ControllerBase { private IFieldManager _fm; private ILogger _lg; /// /// .ctor /// /// public FieldController( IFieldManager fm, ILogger lg) { _fm = fm; _lg = lg; } [HttpPost("new")] public Field StartNewGame() { return _fm.StartNewGame(); } [HttpPost("move")] public Field Move(string identifier) { return _fm.Move(identifier); } [HttpGet("list")] public Field List(string identifier) { return _fm.List(identifier); } } }