Unfair

From Esolang
Jump to navigation Jump to search

Unfair is an esolang based on a game about counting numbers "unfairly". The esolang is made by User:Gilbert189 (but not the game).

How to play Unfair

A player has a counting number or CN (which starts at 5) and raising number or RN (which starts at 1). They also have a global count or GC, with initial number 0. A player counts by incrementing the global count by their counting number.

The goal is to increment the global count to at least 100. If done so, the player's counting number will be incremented by their raising number. The global counter then resets.

If a player ever gets their counting number greater than 100, then everyone's counting numbers will be reset to 5. The player who got their counting number to 100 will add 0.5 to their raising number.

Here's an example game of Unfair:

Player 1 counts. # GC is now 5.
Player 2 counts. # GC is now 10.
Player 1 counts. # GC is now 15.
Player 1 counts. # GC is now 20.
...
Player 1 counts. # GC is now 90.
Player 2 counts. # GC is now 95.
Player 2 counts. # Player 2's CN is incremented by its RN, which is 1. GC is now 0.
Player 1 counts. # GC is now 5.
Player 2 counts. # GC is now 11.

It's not restricted to two players, an uncountable infinite amount of players can join in. (so technically, Player 1.3514 counts. is a valid line)

How to code Unfair

Before I show you some example code, I have to add some quirks to make this more like a esolang than a game.

De-syncing

To make this more "computable", I added a feature called "de-syncing". When a player "de-syncs", the player counts the global count from the past, but other players will just ignore it; that is, until they noticed there is a mistake, and they have the option to "re-sync" the count. On the actual game, this is equivalent to making a deliberate mistake.

Here's an example of a de-sync:

# Assume P1 has CN of 8, P2 has CN of 12.
Player 2 counts. #                                     GC is now 44.
Player 1 counts. #                                     GC is now 52.
Player 1 counts. #                                     GC is now 60.
Player 2 de-syncs for 2 steps. #                       GC is now 44, while it's actually 72.
Player 1 counts. #                                     GC is now 52, while it's actually 80.
Player 2 re-syncs the count from Player 2's mistake. # GC is now 92.

You can also de-sync in layers, thus making three branching universes:

# Assume P1 has CN of 8, P2 has CN of 12, P3 has CN of 9.
# (GC1: actual value)                                  GC1  GC2  GC3
Player 2 counts. #                                      41────┬────┐
Player 3 counts. #                                      50    v    │
Player 1 de-syncs for 2 steps. #                        58──>41    │
Player 3 counts. #                                      67   50    │
Player 2 de-syncs for 4 steps. #                        79   62──>41
Player 3 counts. #                                      88   71   50
Player 1 counts. #                                      96   79   58
Player 2 re-syncs the count from Player 1's mistake. #   0<────────┘

If the same player de-synced more than 2 times, you can add an ordinal number to specify de-syncs:

# Assume P1 has CN of 8, P2 has CN of 12, P3 has CN of 9.
# (GC1: actual value)                                      GC1  GC2  GC3
Player 2 counts. #                                          41────┬────┐
Player 3 counts. #                                          50    v    │
Player 1 de-syncs for 2 steps. #                            58──>41    │
Player 3 counts. #                                          67   50    │
Player 1 de-syncs for 4 steps. #                            75   62──>41
Player 3 counts. #                                          84   71   50
Player 1 counts. #                                          92   79   58
Player 2 re-syncs the count from Player 1's 1st mistake. #   0<────────┘

If things gone out of control, you can always reset to zero.

Player 1 de-syncs for 12 steps. #              GC is... whatever.
Player 2 re-syncs the count by a full reset. # All the states of the game are reset. GC is now 0.
Player 1 counts. #                             GC is now 5.

Jumps

I thought making an unprogrammable esolang would be pretty boring, so I added jumps so you get at least something to work with (or something)

You can jump into a label. To make the labels you use Label [label]. To jump to label you use Do [label] again.:

Label loop.
Player 1 counts.
Do loop again.

There's also an if command. There are three valid comparisons for it:

Label loop.
Player 1 counts.
If the count resets, then do loop again.

Label loop2.
Player 2 counts.
If Player 1's counting number is bigger then Player 2's, then do loop2 again.
# Here Player 1's counting number is compared with Player 2's counting number.

Label loop3.
Player 2 counts.
If Player 1's raising number is smaller then Player 2's counting number, then do loop3 again.
# Here Player 1's raising number is compared with Player 2's counting number.

I/O

Of course, no esolang is perfect without proper I/O!

To print the global count, you use Evaluate the count.:

Label loop.
Player 1 counts.
Evaluate the count.
If the count resets, then do loop again.

To print a player's counting number, you use Evaluate Player 1's counting number.:

Evaluate Player 1's counting number.
Label loop.
Player 1 counts.
If the count resets, then do exit again.
Do loop again.
Label exit.
Evaluate Player 1's counting number.

The same thing applies to raising numbers.

To input a number, change Evaluate to Define:

Define the count.
Evaluate the count.

Example code

H

This prints 72, which is H in ASCII:

Player 1 counts.
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Player 1 counts. 
Evaluate the count.

Number cat

Label loop.
Define Player 1's raising number.
Evaluate Player 1's raising number.
Do loop again.