Hi,
You could use stacks to represent the integer pairs that make up rational numbers, where the top piece is the numerator and the bottom piece is the denominator.
Assuming that the game starts with a list of integers, you could start with a single piece on the board for each integer, then when two numbers are combined you could add a piece to the stack if the result is rational. So if the move is / and the pieces are 3 and 8, then the result will be a stack with 8 on level 0 (denominator) and 3 on level 1 (numerator), and the old 8 piece will be deleted.
You may need to explicitly describe each move +, -, *, / in game logic to perform the correct calculation on pairs of numerator/denominator stacks.
You may run into issues with larger numbers. Maybe the count mechanism (e.g. Mancala) could be used to store a number at each site rather than a numbered piece?
We can add a new style for drawing stacks as rational number pairs if that would help.
Regards,
Cameron
You could use stacks to represent the integer pairs that make up rational numbers, where the top piece is the numerator and the bottom piece is the denominator.
Assuming that the game starts with a list of integers, you could start with a single piece on the board for each integer, then when two numbers are combined you could add a piece to the stack if the result is rational. So if the move is / and the pieces are 3 and 8, then the result will be a stack with 8 on level 0 (denominator) and 3 on level 1 (numerator), and the old 8 piece will be deleted.
You may need to explicitly describe each move +, -, *, / in game logic to perform the correct calculation on pairs of numerator/denominator stacks.
You may run into issues with larger numbers. Maybe the count mechanism (e.g. Mancala) could be used to store a number at each site rather than a numbered piece?
We can add a new style for drawing stacks as rational number pairs if that would help.
Regards,
Cameron