public ActionResult ValidateMove(string pieceName, string color, string initialCoordinates, bool includedInCastling, string currentCoordinates, string newCoordinates, string newCoordPieceColor, List <string> piecePlacementMap) { Piece piece = new Piece(pieceName, color, Movements.GetMovementFor(pieceName), initialCoordinates, includedInCastling); bool valid = piece.ValidateMovement(new MoveAttempt(currentCoordinates, newCoordinates, newCoordPieceColor, piecePlacementMap)); return(Json(new { valid = valid }, JsonRequestBehavior.AllowGet)); }