public class PlayerState : ITetrominoCollectionNotifier,
IComparable<PlayerState>, IEquatable<PlayerState>
PlayerState | Initializes a new instance of the PlayerState class. |
AddListener(IPlayerStatePuzzleFinishedAsyncListener) | Subscribes the puzzle listener to this PlayerState. |
AddListener(IPlayerStatePuzzleListener) | Subscribes the puzzle listener to the events of this PlayerState. |
AddListener(ITetrominoCollectionListener) | Subscribes the tetromino listener to the events of this PlayerState. |
AddTetromino | Adds the given tetromino to the player's personal collection. Also calls the OnTetrominoCollectionChanged(TetrominoShape, Int32) method of all listeners. |
CompareTo | 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.
|
Equals(Object) |
Determines whether the specified object is equal to the current PlayerState.
(Overrides ObjectEquals(Object)) |
Equals(PlayerState) | Indicates whether the current PlayerState is equal to another PlayerState of the same type. |
FinishPuzzle | Removes the puzzle specified in the FinishedPuzzleInfo from the player's unfinished puzzles and adds it to the list of finished puzzles. Also calls the OnPuzzleFinished(FinishedPuzzleInfo) method of all listeners. |
FinishPuzzleAsync | Asynchronously calls and awaits the OnPuzzleFinishedAsync(FinishedPuzzleInfo, CancellationToken) of all subscribed listeners. After that, it calls the FinishPuzzle(FinishedPuzzleInfo) method. |
GetHashCode |
Returns a hash code for this instance.
(Overrides ObjectGetHashCode) |
GetPlayerInfo | Returns a copy of information about the player wrapped in a PlayerStatePlayerInfo object. It prevents modification of the original data. |
GetPuzzleWithId | Gets the puzzle matching the specified identifier. |
GetUnfinishedPuzzles | Creates a list of puzzles the player is currently working on. |
PlaceNewPuzzle | Adds the puzzle to the player's unfinished puzzles. Also calls the OnPuzzleAdded(Puzzle) method of all listeners. |
RemoveListener(IPlayerStatePuzzleFinishedAsyncListener) | Unsubscribes the puzzle listener from the events of this PlayerState. |
RemoveListener(IPlayerStatePuzzleListener) | Unsubscribes the puzzle listener from the events of this PlayerState. |
RemoveListener(ITetrominoCollectionListener) | Unsubscribes the tetromino listener from the events of this PlayerState. |
RemoveTetromino | Removes the tetromino from the player's personal collection. Also calls the OnTetrominoCollectionChanged(TetrominoShape, Int32) method of all listeners. |
Equality(PlayerState, PlayerState) | Implements the operator ==. |
GreaterThan(PlayerState, PlayerState) | Implements the operator >. |
GreaterThanOrEqual(PlayerState, PlayerState) | Implements the operator >=. |
Inequality(PlayerState, PlayerState) | Implements the operator !=. |
LessThan(PlayerState, PlayerState) | Implements the operator <. |
LessThanOrEqual(PlayerState, PlayerState) | Implements the operator <=. |
MaxPuzzles | The maximum number of puzzles a player can be working on at the same time. |