added method section for Piecetype
This commit is contained in:
parent
44c660ef3b
commit
f562122b31
|
|
@ -1,5 +1,27 @@
|
||||||
package backend;
|
package backend;
|
||||||
|
|
||||||
|
/*Task: Chess Game Piece Type Enumeration
|
||||||
|
|
||||||
|
Class name: PieceType.java
|
||||||
|
|
||||||
|
Methods name:
|
||||||
|
- getSummary() - Returns a single character representation of the piece type (P, R, N, B, Q, K)
|
||||||
|
- fromSummary(char c) - Static method that converts a character to the corresponding PieceType
|
||||||
|
|
||||||
|
Methods output:
|
||||||
|
- Single character representation of piece types
|
||||||
|
- PieceType enum value from character input
|
||||||
|
|
||||||
|
Methods works:
|
||||||
|
- Chess piece type enumeration
|
||||||
|
- Conversion between piece types and their character representations
|
||||||
|
- Support for standard chess piece notation
|
||||||
|
- Mapping between characters and piece types
|
||||||
|
|
||||||
|
Authors: Bédier Jérôme jerome.bedier@ecam.fr Gardern Florian florian.gardner@ecam.fr Sideng
|
||||||
|
Date: 05/14/2025
|
||||||
|
*/
|
||||||
|
|
||||||
public enum PieceType {
|
public enum PieceType {
|
||||||
Pawn, Rook, Knight, Bishop, Queen, King;
|
Pawn, Rook, Knight, Bishop, Queen, King;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue