aboutsummaryrefslogtreecommitdiff
path: root/src/main/game/move.h
blob: 825060928ee464529b4785e9801ef8b887399982 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//
// Created by thecharlesblake on 07/06/18.
//

#ifndef SOLVITAIRE_MOVE_H
#define SOLVITAIRE_MOVE_H

#include "pile.h"

struct move {
    enum class mtype : uint8_t {regular, dominance, built_group, stock_k_plus, stock_to_all_tableau, sequence, accordion, null};

    explicit move(mtype, pile::ref = 255 , pile::ref = 255, int8_t = 1, bool reveal_move_ = false, bool flip_waste_ = false);
    friend bool operator==(const move&, const move&);

    void make_reveal_move();

    mtype type;
    pile::ref from;
    pile::ref to;
    // For built piles the size of the pile, or for stock k-plus moves,
    // the number of cards to be moved from the stock to the waste before the waste card is played on the foundations
    int8_t count;
    bool reveal_move;
    bool flip_waste;
};

#endif //SOLVITAIRE_MOVE_H