commit 3494003683863b54d41fc3aefae802168dcd37b8 Author: rm-dr <96270320+rm-dr@users.noreply.github.com> Date: Sat Nov 1 17:16:32 2025 -0700 Initial commit diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..1b83267 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a5a48de --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +.next +node_modules +*.ignore +target +.DS_Store +webui/src/wasm diff --git a/README.md b/README.md new file mode 100644 index 0000000..493c668 --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# Minimax + +## Rules + +This game is played in two rounds, starting with an empty eleven-space board. Red always goes first. + +On Red's board (i.e, duing the first round), Red's job is to maximize the value of the expression; Blue's job is to minimize it. +Players take turns placing the fourteen symbols `0123456789+-×÷` on the board, with the maximizing player taking the first move. + +A board's syntax must always be valid. Namely, the following rules are enforced: + +- Each symbol may only be used once +- The binary operators `+-×÷` may not be next to one another, and may not be at the end slots. +- The unary operator `-` (negative) must have a number as an argument. Therefore, it cannot be left of an operator (like `-×`), and it may not be in the rightmost slot. +- `0` may not follow `÷`. This prevents most cases of zero-division, but isn't perfect. `÷-0` will break the game, and `÷0_+` is forbidden despite being valid syntax once the empty slot is filled (for example, with `÷03+`). This is done to simplyify game logic, and might be improved later. + +## Building + +See `build.sh`.