public IActionResult CheckPattern(ColoursDto colours) { var boardResult = Board.CheckPattern(colours.Colours); if (!boardResult.result) { return(BadRequest("Board is not properly initialized")); } return(Ok( new { ColoursCorrectlyGuessed = boardResult.colour, ColoursAndPositionCorrectlyGuessed = boardResult.positionAndColour } )); }
public IActionResult Initialize(ColoursDto request = null) { Board.Initialize(request.Colours); return(Ok()); }