# Chaos Of Operations

TLDR; You are trying to get a bigger number than your opponent. Each turn, place one of your numbers and operators in either your or your opponent's equation. Game ends when both players run out of numbers and operators. Whoever has the larger number wins.

**Instructions**

The objective of this game is to get a larger number than your opponent. When it is your turn, your play area will move to the top. Each turn, pick one of your unused numbers, and one of your unused operators, and place it in either your or your opponent's equation. You can insert your number and operator anywhere in either equation, so you can do moves to make your equation bigger, or sabotage your opponent and try to make theirs smaller. To do this, start by selecting one of your unused numbers and operators from the bottom of your play area, and hover the mouse between two elements in an equation. If you are on a PC, just hover the mouse between two numbers in an equation, and click to place it there. If you are on mobile, tap one of the numbers in either equation to get the option to place your new move on either side of it.

At the end of the game, the computer will evaluate each equation according to PEMDAS, so make sure you take that into account during play. Remember, the exponent will be evaluated first, the multiplication, division, and modulus in the order it appears second, and addition and subtraction last. The player with the largest number at the end of the game is the winner.

**What is "mod"?**

Modulus (mod) is like division, except that you take the remainder of the division rather than the quotient. For example, if your equation is "5 mod 2", the way you compute this is by doing the division of 5 divide by 2, which is 2 with a remainder of 1. For modulus, the 1 is what you are interested, so the result of "5 mod 2" is 1. The simple rule for playing with modulus is this: if I have some number called X, no matter how big or how small, and I take the modulus by some other number called Y, the result will be somewhere between 0 and Y – 1. This means that if I have a huge number mod 13, then the result will be a number from 0 to 12. The specifics of which depends on exactly what the huge number is, but you are guaranteed to get a number in that range, which is good enough for most play purposes.

This is an open source project. If you are interested in contributing, check out the source on GitHub.