flutter: 新增 types.dart
This commit is contained in:
parent
3e3be7b1b3
commit
4373bd6bae
|
@ -0,0 +1,77 @@
|
|||
enum Move { none }
|
||||
|
||||
enum MoveType { place, move, remove }
|
||||
|
||||
enum Color { noColor, black, white, count, draw, nobody }
|
||||
|
||||
enum Phase { none, ready, placing, moving, gameOver }
|
||||
|
||||
enum Action { none, select, place, remove }
|
||||
|
||||
enum GameOverReason {
|
||||
loseReasonNoReason,
|
||||
loseReasonlessThanThree,
|
||||
loseReasonNoWay,
|
||||
loseReasonBoardIsFull,
|
||||
loseReasonResign,
|
||||
loseReasonTimeOver,
|
||||
drawReasonThreefoldRepetition,
|
||||
drawReasonRule50,
|
||||
drawReasonBoardIsFull
|
||||
}
|
||||
|
||||
enum PieceType { none, blackStone, whiteStone, ban, count, stone }
|
||||
|
||||
enum Piece { none, blackStone, whiteStone, ban }
|
||||
|
||||
enum Square {
|
||||
SQ_0,
|
||||
SQ_1,
|
||||
SQ_2,
|
||||
SQ_3,
|
||||
SQ_4,
|
||||
SQ_5,
|
||||
SQ_6,
|
||||
SQ_7,
|
||||
SQ_8,
|
||||
SQ_9,
|
||||
SQ_10,
|
||||
SQ_11,
|
||||
SQ_12,
|
||||
SQ_13,
|
||||
SQ_14,
|
||||
SQ_15,
|
||||
SQ_16,
|
||||
SQ_17,
|
||||
SQ_18,
|
||||
SQ_19,
|
||||
SQ_20,
|
||||
SQ_21,
|
||||
SQ_22,
|
||||
SQ_23,
|
||||
SQ_24,
|
||||
SQ_25,
|
||||
SQ_26,
|
||||
SQ_27,
|
||||
SQ_28,
|
||||
SQ_29,
|
||||
SQ_30,
|
||||
SQ_31,
|
||||
}
|
||||
|
||||
const sqBegin = Square.SQ_8;
|
||||
const sqEnd = 32;
|
||||
const sqNumber = 40;
|
||||
const effectiveSqNumber = 24;
|
||||
|
||||
enum MoveDirection { clockwise, anticlockwise, inward, outward }
|
||||
|
||||
enum LineDirection { horizontal, vertical, slash }
|
||||
|
||||
enum File { A, B, C }
|
||||
|
||||
const fileNumber = 3;
|
||||
|
||||
enum Rank { rank_1, rank_2, rank_3, rank_4, rank_5, rank_6, rank_7, rank_8 }
|
||||
|
||||
const rankNumber = 8;
|
Loading…
Reference in New Issue