This repository has been archived by the owner on Feb 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mjcard.h
89 lines (66 loc) · 1.57 KB
/
mjcard.h
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#pragma once
#include <vector>
#include <string>
#include "mj.h"
class mjcard : public mj{
protected:
int card[17];
int _ocard[17];
int playernumber;
std::vector<int> need_card, need_card_assist;
std::string need_status;
int cptr;
int _ocptr;
void transfer(int);
int card_merge(int*);
void print_c_card(int*, int);
#pragma region AI & check who
int card_times[44];
int card_price(int*, int);
void card_grouping();
int card_organize(int*, int, std::vector<int>&, bool, bool);
int get_card_expect(int*, int);
int card_expect(int*, int, int*);
bool card_expect(int*, int, int);
bool card_expect_eat(int*, int, int);
bool card_level(int, int);
int search_array_min(int*, int);
int search_vextor_min(std::vector<int>&);
bool search_vector(std::vector<int>&, int);
int search_vector_index(std::vector<int>&, int, int);
int getcardtimes(int*, int, int);
#pragma endregion</spin>
public:
mjcard();
mjcard(int*, int);
void push(int);
int pop();
int pop(int);
int del(int);
void swap(int, int);
bool find(int);
int find_index(int);
void arrange();
bool check_who();
bool check_who(int);
bool check_eat(int);
bool check_pung(int);
void print();
void print_o();
void print_c();
void print_o_c();
std::vector<int> get_card();
int get_cptr();
int get_ocptr();
#pragma region AI
int need(int*,int);
std::vector<int> need(int);
std::string get_need_status();
void get(int,int,int);
int out();
void set_mycardtimes(int*, int);
void set_mycardtimes(int);
void set_mycardtimes(std::vector<int>);
void set_need_card();
#pragma endregion</spin>
};