Category Archives: JavaScript

Cow Logic

I hereby release the first beta version of Cow Logic, an awful, terrible game that I thought of a couple weeks ago. The thing is, this isn’t one of those games where you throw away the instructions and just figure it out as you go. That would be nice, but at the moment you would have to be a codebreaker if you didn’t read my little how-to section. Okay, here goes.

Each icon represents a boolean value or operator: 2% = TRUE, no soy = FALSE, cow = AND, udder = OR (think udd-OR), cowbell = XOR (or, but not both), cheese = NAND (neither), and milking bucket = OPPOSITE. Each operator takes in two booleans as its arguments, and it returns TRUE if its condition is satisfied, and FALSE if it is not. When a bunch of stuff is strung together, you should evaluate it left-to-right. Here’s an example of how to translate a game board in your head.

[no soy] [cheese] [no soy] [cowbell] [2%] [udder] [2%] [cow] [2%] [milking bucket] [no soy]
false NAND false XOR true OR true AND true OPPOSITE false
((((false NAND false) XOR true) OR true) AND true) OPPOSITE false

The expression “false NAND false” reduces to just “true,” since both arguments (false and false) are false. Then we have a “true XOR true,” which becomes false because the requirement of XOR is that exactly one of the arguments is true. Then you do “false OR true,” which is true, then “true AND true,” which is true, and finally “true OPPOSITE false.” True and false are indeed opposites, so the final answer is true.

So that’s about it. Just enter the number of operators you want, evaluate the expression, and click the button to check your answer. You have to refresh the page to generate a new one. …And that’s about it at this point. Yeah, it’s very much still in beta. I like it though.

Afterthought: maybe I should have used the spelling “troo.”