GameActionProcessor Class

Processes actions of one player in the game. The class is responsible for updating the game state based on the player's actions. It isn't responsible for verifying the actions. The actions should be verified by an ActionVerifier before being processed.

Definition

Namespace: ProjectLCore.GameActions
Assembly: ProjectLCore (in ProjectLCore.dll) Version: 1.0.0+d0f5e2a7a5f4bb0431970f279d2f79d24b15d256
C#
public class GameActionProcessor : ActionProcessorBase, 
	IAsyncActionProcessor
Inheritance
Object    ActionProcessorBase    GameActionProcessor
Implements
IAsyncActionProcessor

Constructors

GameActionProcessor Initializes a new instance of the GameActionProcessor class.

Properties

FinishedPuzzlesQueue When a Puzzle is finished with a PlaceTetrominoAction, information about the finished puzzle is added to this queue.

Methods

ProcessAction(DoNothingAction) Does nothing.
(Overrides ActionProcessorBaseProcessAction(DoNothingAction))
ProcessAction(EndFinishingTouchesAction) Signals PlayerEndedFinishingTouches.
(Overrides ActionProcessorBaseProcessAction(EndFinishingTouchesAction))
ProcessAction(GameAction) Processes the given GameAction.
(Inherited from ActionProcessorBase)
ProcessAction(ChangeTetrominoAction) Removes the old tetromino from the appropriate PlayerState and returns it to the GameState. Then removes the new tetromino from the GameState and adds it to the PlayerState.
(Overrides ActionProcessorBaseProcessAction(ChangeTetrominoAction))
ProcessAction(MasterAction) Places all the tetrominos specified by TetrominoPlacements. Each of these placements is treaded like a PlaceTetrominoAction. Also signals PlayerUsedMasterAction
(Overrides ActionProcessorBaseProcessAction(MasterAction))
ProcessAction(PlaceTetrominoAction) Adds the tetromino to the puzzle. If this action completes the puzzle and the CurrentGamePhase is not FinishingTouches, the player gets a reward and the tetrominos he used to complete the puzzle are returned to him. This doesn't happen during FinishingTouches.
(Overrides ActionProcessorBaseProcessAction(PlaceTetrominoAction))
ProcessAction(RecycleAction) Removes the puzzles from the GameState puzzle rows and puts them to the bottom of the deck. Then refills the puzzle rows.
(Overrides ActionProcessorBaseProcessAction(RecycleAction))
ProcessAction(TakeBasicTetrominoAction) Removes a O1 tetromino from the GameState and adds it to the appropirate PlayerState.
(Overrides ActionProcessorBaseProcessAction(TakeBasicTetrominoAction))
ProcessAction(TakePuzzleAction) Removes the puzzle from the GameState and adds it the appropriate PlayerState. Signals PlayerTookBlackPuzzle if the player took a black puzzle, and BlackDeckIsEmpty if the black deck is empty.
(Overrides ActionProcessorBaseProcessAction(TakePuzzleAction))
ProcessActionAsync Processes the given GameAction asynchronously.

See Also