Click or drag to resize
Piece Class
The Piece class represents a gamepiece on the Board
Inheritance Hierarchy
SystemObject
  VikingChess.ModelPiece

Namespace: VikingChess.Model
Assembly: VikingChess (in VikingChess.exe) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public class Piece

The Piece type exposes the following members.

Constructors
Methods
  NameDescription
Public methodcanMoveTo
Returns true or false if the Piece can move to the Square
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodgenerateLegalMoves
Returns an List containing all legal Moves for the Piece from its current Square.
Public methodgetColor
Returns the color of the Piece
Public methodgetFile
Returns the file of the Piece on the board.
Public methodGetHashCode (Inherited from Object.)
Public methodgetLocation
Public methodgetRank
Returns the rank of the Piece on the board.
Public methodgetType
Returns the type of the Piece
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodsetColor
Sets the color of the Piece.
Public methodsetFile
Sets the file of the Piece
Public methodsetLocation
Sets the rank and file of this Piece
Public methodsetRank
Sets the rank of the Piece
Public methodsetType
Sets the type of the Piece.
Public methodToString (Overrides ObjectToString.)
Top
Fields
See Also