Skip to content

Commit

Permalink
move check_playerid to common.h
Browse files Browse the repository at this point in the history
  • Loading branch information
salix5 committed Dec 15, 2024
1 parent 5c58286 commit 4ff9722
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 4 additions & 0 deletions common.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
#include <assert.h>
typedef unsigned char byte;

inline bool check_playerid(int32_t playerid) {
return playerid >= 0 && playerid <= 1;
}

#define MATCH_ALL(x,y) (((x)&(y))==(y))
#define MATCH_ANY(x,y) ((x)&(y))
#define ADD_BIT(x,y) ((x)|=(y))
Expand Down
4 changes: 0 additions & 4 deletions field.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
#include "interpreter.h"
#include <cstring>

bool check_playerid(int32_t playerid) {
return playerid >= 0 && playerid <= 1;
}

int32_t field::field_used_count[32] = {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5};

bool chain::chain_operation_sort(const chain& c1, const chain& c2) {
Expand Down
2 changes: 0 additions & 2 deletions field.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ class effect;

using effect_vector = std::vector<effect*>;

bool check_playerid(int32_t playerid);

struct tevent {
card* trigger_card{ nullptr };
group* event_cards{ nullptr };
Expand Down

0 comments on commit 4ff9722

Please sign in to comment.