PlayerStateCompareTo Method

Compares THIS instance with another PlayerState and returns an integer that indicates whether THIS instance precedes, follows, or occurs in the same position in the final scoring order as the other player. This is used for determining the order of players in the leaderboard. Meaning that if A<B then A is in a better position than B.

The player with the highest score wins.

  • In case of a tie, the player who has completed the most puzzles wins.
  • In case of a tie, the player with the most leftover tetrominos wins.
  • If there is still a tie, the payers are placed at the same position.

Definition

Namespace: ProjectLCore.GameLogic
Assembly: ProjectLCore (in ProjectLCore.dll) Version: 1.0.0+d0f5e2a7a5f4bb0431970f279d2f79d24b15d256
C#
public int CompareTo(
	PlayerState? other
)

Parameters

other  PlayerState
An object to compare with this instance.

Return Value

Int32
A value that indicates the relative order of the objects being compared. The return value has these meanings:
Value Meaning
Less than zero This instance precedes other in the sort order.
Zero This instance occurs in the same position in the sort order as other.
Greater than zero This instance follows other in the sort order.

Implements

IComparableTCompareTo(T)

See Also