some preparations for challenge mode

This commit is contained in:
Alexander Eckart committed 2012-12-16 14:34:17 +01:00
1 parent b4e728f540
commit 1fe8f76bda
5 files changed
+183 -2

No files matched your search

@@ -0,0 +1,85 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Vocaluxe.PartyModes
{
public class ChallengeRounds
{
private List<ChallengeRound> _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<ChallengeRound>();
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<int> _ProfileIDs;
public int NumPlayer { get{ return _ProfileIDs.Count; } }
public ChallengeRound()
{
_ProfileIDs = new List<int>();
}
public void AddPlayer(int ProfileID)
{
_ProfileIDs.Add(ProfileID);
}
public int GetPlayer(int Nr)
{
if (Nr >= _ProfileIDs.Count)
return -1;
return _ProfileIDs[Nr];
}
}
}
@@ -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<int> 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()
+85
View File
@@ -0,0 +1,85 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Vocaluxe.PartyModes
{
public class ChallengeRounds
{
private List<ChallengeRound> _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<ChallengeRound>();
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<int> _ProfileIDs;
public int NumPlayer { get{ return _ProfileIDs.Count; } }
public ChallengeRound()
{
_ProfileIDs = new List<int>();
}
public void AddPlayer(int ProfileID)
{
_ProfileIDs.Add(ProfileID);
}
public int GetPlayer(int Nr)
{
if (Nr >= _ProfileIDs.Count)
return -1;
return _ProfileIDs[Nr];
}
}
}
+5 -1
View File
@@ -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<int> 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()
@@ -107,6 +107,9 @@
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Compile Include="ChallengeRounds.cs">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Compile>
<Compile Include="PartyModeChallenge.cs">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Compile>