
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

struct t_move
{
  unsigned char from;
  unsigned char to;
  unsigned char capture;
  char promotion;
};

struct t_move encode_move(const unsigned char from, const unsigned char to, const unsigned char capture, const char promotion)
{
  struct t_move move;
  move.from = from;
  move.to = to;
  move.capture = capture;
  move.promotion = promotion;
  return move;
}

void generate_moves(struct t_move* moves, size_t array_size)
{
  struct t_move move;
  //memset(&move, '\0', sizeof(move));
  //move.from = 36;
  move = encode_move(36, 37, 0, '\0');
  moves[0] = move;
}

int main(void)
{
  struct t_move move;
  struct t_move moves[128];
  
  move.from = 35;
  printf("%ld\n", sizeof(move));
  
  generate_moves(moves, sizeof(moves));
  
  printf("%d\n", moves[0].from);
  
  return EXIT_SUCCESS;
}
