diff --git a/Output/PartyModes/Challenge/Code/ChallengeRounds.cs b/Output/PartyModes/Challenge/Code/ChallengeRounds.cs new file mode 100644 index 00000000..5a40bc1e --- /dev/null +++ b/Output/PartyModes/Challenge/Code/ChallengeRounds.cs @@ -0,0 +1,85 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Vocaluxe.PartyModes +{ + public class ChallengeRounds + { + private List _Rounds; + + public ChallengeRounds(int NumRounds, int NumPlayer, int NumPlayerAtOnce) + { + BuildRounds(NumRounds, NumPlayer, NumPlayerAtOnce); + } + + public ChallengeRound GetRound(int RoundNr) + { + return null; + } + + private void BuildRounds(int NumRounds, int NumPlayer, int NumPlayerAtOnce) + { + _Rounds = new List(); + + if (NumPlayerAtOnce < 1 || NumPlayerAtOnce > 6 || NumPlayer < 1 || NumRounds < 1) + return; + + switch (NumPlayerAtOnce) + { + case 1: + for (int i = 0; i < NumRounds; i++) + { + + } + break; + + case 2: + break; + + case 3: + break; + + case 4: + break; + + case 5: + break; + + case 6: + break; + + default: + break; + } + } + + + } + + public class ChallengeRound + { + private List _ProfileIDs; + + public int NumPlayer { get{ return _ProfileIDs.Count; } } + + + public ChallengeRound() + { + _ProfileIDs = new List(); + } + + public void AddPlayer(int ProfileID) + { + _ProfileIDs.Add(ProfileID); + } + + public int GetPlayer(int Nr) + { + if (Nr >= _ProfileIDs.Count) + return -1; + + return _ProfileIDs[Nr]; + } + } +} diff --git a/Output/PartyModes/Challenge/Code/PartyModeChallenge.cs b/Output/PartyModes/Challenge/Code/PartyModeChallenge.cs index 2c836dee..30f48738 100644 --- a/Output/PartyModes/Challenge/Code/PartyModeChallenge.cs +++ b/Output/PartyModes/Challenge/Code/PartyModeChallenge.cs @@ -23,7 +23,8 @@ namespace Vocaluxe.PartyModes public struct DataToScreenMain { - + public int CurrentRoundNr; + } #endregion ToScreen @@ -77,6 +78,8 @@ namespace Vocaluxe.PartyModes public int NumPlayerAtOnce; public int NumRounds; public List ProfileIDs; + + public int CurrentRoundNr; } private DataToScreenConfig ToScreenConfig; @@ -106,6 +109,7 @@ namespace Vocaluxe.PartyModes GameData.NumPlayer = 4; GameData.NumPlayerAtOnce = 2; GameData.NumRounds = 2; + GameData.CurrentRoundNr = 1; } public override bool Init() diff --git a/PartyModeChallenge/ChallengeRounds.cs b/PartyModeChallenge/ChallengeRounds.cs new file mode 100644 index 00000000..5a40bc1e --- /dev/null +++ b/PartyModeChallenge/ChallengeRounds.cs @@ -0,0 +1,85 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Vocaluxe.PartyModes +{ + public class ChallengeRounds + { + private List _Rounds; + + public ChallengeRounds(int NumRounds, int NumPlayer, int NumPlayerAtOnce) + { + BuildRounds(NumRounds, NumPlayer, NumPlayerAtOnce); + } + + public ChallengeRound GetRound(int RoundNr) + { + return null; + } + + private void BuildRounds(int NumRounds, int NumPlayer, int NumPlayerAtOnce) + { + _Rounds = new List(); + + if (NumPlayerAtOnce < 1 || NumPlayerAtOnce > 6 || NumPlayer < 1 || NumRounds < 1) + return; + + switch (NumPlayerAtOnce) + { + case 1: + for (int i = 0; i < NumRounds; i++) + { + + } + break; + + case 2: + break; + + case 3: + break; + + case 4: + break; + + case 5: + break; + + case 6: + break; + + default: + break; + } + } + + + } + + public class ChallengeRound + { + private List _ProfileIDs; + + public int NumPlayer { get{ return _ProfileIDs.Count; } } + + + public ChallengeRound() + { + _ProfileIDs = new List(); + } + + public void AddPlayer(int ProfileID) + { + _ProfileIDs.Add(ProfileID); + } + + public int GetPlayer(int Nr) + { + if (Nr >= _ProfileIDs.Count) + return -1; + + return _ProfileIDs[Nr]; + } + } +} diff --git a/PartyModeChallenge/PartyModeChallenge.cs b/PartyModeChallenge/PartyModeChallenge.cs index 2c836dee..30f48738 100644 --- a/PartyModeChallenge/PartyModeChallenge.cs +++ b/PartyModeChallenge/PartyModeChallenge.cs @@ -23,7 +23,8 @@ namespace Vocaluxe.PartyModes public struct DataToScreenMain { - + public int CurrentRoundNr; + } #endregion ToScreen @@ -77,6 +78,8 @@ namespace Vocaluxe.PartyModes public int NumPlayerAtOnce; public int NumRounds; public List ProfileIDs; + + public int CurrentRoundNr; } private DataToScreenConfig ToScreenConfig; @@ -106,6 +109,7 @@ namespace Vocaluxe.PartyModes GameData.NumPlayer = 4; GameData.NumPlayerAtOnce = 2; GameData.NumRounds = 2; + GameData.CurrentRoundNr = 1; } public override bool Init() diff --git a/PartyModeChallenge/PartyModeChallenge.csproj b/PartyModeChallenge/PartyModeChallenge.csproj index 422a8bf5..3155de6c 100644 --- a/PartyModeChallenge/PartyModeChallenge.csproj +++ b/PartyModeChallenge/PartyModeChallenge.csproj @@ -107,6 +107,9 @@ + + Always + Always