Puzzle Class

Represents a puzzle in the game.

Definition

Namespace: ProjectLCore.GamePieces
Assembly: ProjectLCore (in ProjectLCore.dll) Version: 1.0.0+d0f5e2a7a5f4bb0431970f279d2f79d24b15d256
C#
public class Puzzle
Inheritance
Object    Puzzle

Constructors

Puzzle Initializes a new instance of the Puzzle class.

Properties

Id The unique identifier of the puzzle. Two puzzles have the same ID if they have the same color and puzzle number.
Image A BinaryImage representing the puzzle. Specifies which cells of the puzzle need to be filled in.
IsBlack Specifies whether the puzzle is black or white.
IsFinished Indicates whether this puzzle has been completed.
NumEmptyCells The number of cells which need to be filled in.
PuzzleNumber The order number of this puzzle. The file containing the graphics for this puzzle should have the name color-number.png where color is black or white and number is PuzzleNumber.
RewardScore The score the player gets for completing the puzzle.
RewardTetromino The tetromino the player gets for completing the puzzle.

Methods

AddTetromino Places the given tetromino into the puzzle, if it can be placed there.
CanPlaceTetromino Determines whether the given tetromino can be placed into the puzzle.
Clone Clones this instance.
GetUsedTetrominos Enumerates all tetrominos placed into the puzzle.
RemoveTetromino Removes the given tetromino from the puzzle, if at least one tetromino of this kind has been placed in earlier and the are specified by position is filled in.

Fields

_usedTetrominos Contains information about the number of tetrominos of each shape used on the puzzle.

See Also