A new party mode for 3 to 16 players who sing against each other in one-on-one duels. Whoever scores more points moves on, the loser is out, until only the champion is left. - The bracket is shown mirrored: both halves lead towards the final in the center, where the champion is crowned - Players are drawn randomly; if the number of players doesn't fill the bracket, some players get a bye in the first round - Songs are picked randomly from all songs, a category or a playlist, sung as normal, short or medley version, and no song is played twice - Each player has up to 3 jokers for the whole tournament to skip a song they don't like - On a tie, the duel is sung again - The winner of each duel visibly moves on to the next round, and the champion is celebrated at the end Also fixes "Select random" in the player selection of party modes, which only filled half of the slots. Co-authored-by: Florian Ostertag <flokuep@users.noreply.github.com>
74 lines
2.1 KiB
C#
74 lines
2.1 KiB
C#
#region license
|
|
// This file is part of Vocaluxe.
|
|
//
|
|
// Vocaluxe is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// Vocaluxe is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
|
|
#endregion
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using VocaluxeLib.Menu;
|
|
|
|
namespace VocaluxeLib.PartyModes.Tournament
|
|
{
|
|
public class CPartyScreenTournamentNames : CMenuPartyNameSelection
|
|
{
|
|
protected override int _ScreenVersion
|
|
{
|
|
get { return 1; }
|
|
}
|
|
|
|
private new CPartyModeTournament _PartyMode;
|
|
|
|
public override void Init()
|
|
{
|
|
base.Init();
|
|
_PartyMode = (CPartyModeTournament)base._PartyMode;
|
|
_AllowChangePlayerNum = false;
|
|
_Teams = false;
|
|
}
|
|
|
|
public override void OnShow()
|
|
{
|
|
base.OnShow();
|
|
SetPartyModeData(_PartyMode.GameData.NumPlayer);
|
|
while (_PartyMode.GameData.ProfileIds.Count > _NumPlayer)
|
|
{
|
|
_PartyMode.GameData.ProfileIds.RemoveAt(_PartyMode.GameData.ProfileIds.Count - 1);
|
|
}
|
|
|
|
var ids = new List<Guid>[] { _PartyMode.GameData.ProfileIds };
|
|
SetPartyModeProfiles(ids);
|
|
}
|
|
|
|
public override void Back()
|
|
{
|
|
if (_TeamList.Length == 1)
|
|
{
|
|
_PartyMode.GameData.ProfileIds = _TeamList[0];
|
|
}
|
|
|
|
_PartyMode.Back();
|
|
}
|
|
|
|
public override void Next()
|
|
{
|
|
if (_TeamList.Length == 1)
|
|
{
|
|
_PartyMode.GameData.ProfileIds = _TeamList[0];
|
|
}
|
|
|
|
_PartyMode.Next();
|
|
}
|
|
}
|
|
} |