Advertisement
Guest User

Untitled

a guest
Jun 25th, 2022
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. template<const int N>
  2. inline int at() const
  3. {
  4.     assert(N >= 0 && N < NCARDS);
  5.     if (N < BONUS_SKILL)
  6.     {
  7.         return (val >> (N * 5U)) & 0x1FU;
  8.     }
  9.     else if (N == BONUS_SKILL)
  10.     {
  11.         return (val >> 40) & 0xFFU;
  12.     }
  13.     else
  14.     {
  15.         return (val >> 48) & 0xFFU;
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement