private string generateDetail(RealPlayerStep player, TaskType eventTask) { string details = "Részletek: "; details += player.playerName.Equals("") ? "" : player.playerName + ": "; details += getPoints(player) + ", " + eventTask.name.ToLower() + " feladat: " + eventTask.point.ToString() + " P"; return(details); }
private string changeFirstCharacterToUpperIfNeeded(RealPlayerStep player, string generatedText) { if (player.playerName.Equals("")) { generatedText = char.ToUpper(generatedText[0]) + generatedText.Substring(1); } return(generatedText); }
private string getPoints(RealPlayerStep player) { string score = getBasePointText(player.basePoint) + getExtraPointText(player.extraPoint); if (player.throwDice) { score += getDicePointText(player.dicePoint); } return(score); }
private string GenerateTaskText(RealPlayerStep player, TaskType eventTask) { if (calculatePlayerScore(player) >= eventTask.point) { return(" sikeresen elvégezte " + generateThe(eventTask.name) + " " + eventTask.name.ToLower() + " feladatot "); } else { return(generateNakNek(player.playerName) + " nem sikerült " + generateThe(eventTask.name) + " " + eventTask.name.ToLower() + " feladat "); } }
public string GeneratePlayerVSOpponentText(string actionDescription, RealPlayerStep player, PlayerStep opponent, TurnResult turnResult) { string generatedText = addSpace(player.playerName) + generateTurnResultText(turnResult) + genereteOverallScores(player, opponent) + generateDescription(actionDescription) + Environment.NewLine.ToString() + generateDetail(player, opponent); generatedText = changeFirstCharacterToUpperIfNeeded(player, generatedText); return(generatedText.Trim()); }
public string GeneratePlayerVSTaskText(string actionDescription, RealPlayerStep player, TaskType eventTask) { string generatedText = player.playerName + GenerateTaskText(player, eventTask) + genereteOverallScores(player, eventTask.point) + generateDescription(actionDescription) + Environment.NewLine.ToString() + generateDetail(player, eventTask); generatedText = changeFirstCharacterToUpperIfNeeded(player, generatedText); return(generatedText.Trim()); }
private string generateDetail(RealPlayerStep player, PlayerStep opponent) { string details = "Részletek: "; details += player.playerName.Equals("") ? "" : player.playerName + ": "; details += getPoints(player) + " ellenfél: " + getBasePointText(opponent.basePoint); if (opponent.throwDice) { details += getDicePointText(opponent.dicePoint); } return(details); }
private string genereteOverallScores(RealPlayerStep player, PlayerStep opponent) { return("(" + (player.basePoint + player.extraPoint + player.dicePoint) + " vs. " + (opponent.basePoint + opponent.dicePoint) + ")!"); }
private int calculatePlayerScore(RealPlayerStep player) { return(player.basePoint + player.extraPoint + player.dicePoint); }
private string genereteOverallScores(RealPlayerStep player, int taskPoint) { return("(" + calculatePlayerScore(player) + " vs. " + (taskPoint) + ")!"); }
public string GeneratePlayerVSOpponentText(string actionDescription, RealPlayerStep player, PlayerStep opponent, TurnResult turnResult) { return(actionDescription + "|" + player.playerName + "|" + player.basePoint + "|" + player.extraPoint + "|" + player.dicePoint + "|" + opponent.basePoint + "|" + opponent.dicePoint + "|" + turnResult.ToString()); }
public string GeneratePlayerVSTaskText(string actionDescription, RealPlayerStep player, TaskType eventTask) { return(actionDescription + "|" + player.playerName + "|" + player.basePoint + "|" + player.extraPoint + "|" + player.dicePoint + "|" + eventTask.name + "|" + eventTask.point); }