updated some types to u64 in c code

This commit is contained in:
k 2025-10-21 19:07:03 -04:00
parent 008abd6444
commit 054cd41cf6
2 changed files with 6 additions and 6 deletions

View File

@ -2,8 +2,8 @@
#define HELP_H #define HELP_H
#include "types.h" #include "types.h"
long long fullSet(sets *s); unsigned long long fullSet(sets *s);
long long fullSetBoth(game *g); unsigned long long fullSetBoth(game *g);
void print_bitboard(long long bitboard); void print_bitboard(long long bitboard);
unsigned long long *findSet(game *g, long long bit); unsigned long long *findSet(game *g, long long bit);
unsigned long long *charToSet(game *g, char c); unsigned long long *charToSet(game *g, char c);

View File

@ -1,11 +1,11 @@
#include <stdio.h> #include <stdio.h>
#include "types.h" #include "types.h"
long long fullSet(sets *s) { unsigned long long fullSet(sets *s) {
return s->bishops | s->king | s->knights | s->pawns | s->queen | s->rooks; return s->bishops | s->king | s->knights | s->pawns | s->queen | s->rooks;
} }
long long fullSetBoth(game *g) { unsigned long long fullSetBoth(game *g) {
return fullSet(&g->white) ^ fullSet(&g->black); return fullSet(&g->white) ^ fullSet(&g->black);
} }
@ -25,7 +25,7 @@ void print_bitboard(long long bitboard) {
printf("\n"); printf("\n");
} }
long long *findSet(game *g, long long bit) { unsigned long long *findSet(game *g, long long bit) {
if (g->white.pawns & bit) { if (g->white.pawns & bit) {
return &g->white.pawns; return &g->white.pawns;
} else if (g->white.knights & bit) { } else if (g->white.knights & bit) {
@ -55,7 +55,7 @@ long long *findSet(game *g, long long bit) {
} }
} }
long long *charToSet(game *g, char c) { unsigned long long *charToSet(game *g, char c) {
switch (c) { switch (c) {
case 'P': case 'P':
return &g->white.pawns; return &g->white.pawns;