//
// AVP_Multiplayer_InverseSurvivorRank.h
//
// Created by JG - 30 June 2008
//
// Copyright (C) 2008 Rebellion, All Rights Reserved.
//

#ifdef ASURA_USE_PRAGMA_ONCE
#pragma once
#endif

#ifndef __AVP_MULTIPLAYER_INVERSESURVIVORRANK_H__
#define __AVP_MULTIPLAYER_INVERSESURVIVORRANK_H__

// Engine
#include "Core/Asura_LinkList.h"

// Project 
#include "Core/AVP_Settings.h"

//----------------------------------------------------------------------------------------
//////////////////////////////////////////////////////////////////////////////////////////
//  CLASS    :  AVP_Multiplayer_InverseSurvivorRank
//  CREATED  :  JG (18.8.2008)
//  DESC     :  Storage class for players death order in Survivor multiplayer games 
//////////////////////////////////////////////////////////////////////////////////////////
//----------------------------------------------------------------------------------------
class AVP_Multiplayer_InverseSurvivorRank
{
public:
	// Creation function
	static void Create();

	// Destructor
	static void Destroy(); 
	
	// Accessor to player position in the list
	static int FindPlayerInverseRank( Asura_Guid uPlayerGuid ); 

	// Add new player to the list
	static void	AddPlayerToInverseRank( Asura_Guid uPlayerGuid );

	// Reset player information
	static void Reset( void ); 

	// Score calculations and player score updates
	static void UpdatePlayersScoreOnRoundEnd();


protected:
	// Contructor / destructor
	~AVP_Multiplayer_InverseSurvivorRank(); 
	AVP_Multiplayer_InverseSurvivorRank(); 
	
	static u_int CalculateSurvivorScore( u_int Rank, u_int uNumberOfPlayers ); 

private:
	static	Asura_LinkList<Asura_Guid>				s_xPlayersDeathOrder; 
}; 

#endif//__AVP_MULTIPLAYER_INVERSESURVIVORRANK_H__