Code Monkey home page Code Monkey logo

ratmarket's Introduction

Rules for RatMarket

The future is an apocalyptic wasteland.  The main source of meat humans find to consume is that of rats.  Your goal is to play the market and buy and sell rats. You and your opponent compete by buying and selling rat holdings.  Every turn there will be market prices to buy and sell rats, as well as a "rat bucket" that players bid on.  The rat bucket is initialized as a number between 1 and 10.  A rat is added to it after every turn.

First player to $1000 wins.

Example:

Alice and Bob flip a coin.  Alice wins, and will take the first turn.

**********Turn 1: Alice begins***********
  
----------------------------
Alice has $200 and 0 rats.
Bob has $200 and 0 rats.
The market price of a rat is $2.
There is no market history.
The rat bucket has been in play for 0 turns.
----------------------------

Alice, would you like to buy the rat bucket, buy rats, sell rats, or end your turn?  Example: "buy 5" or "Sell 2" or "done" or "buy rat bucket"
buy 4
***Alice buys 4 rats at a price of $8.***

Alice, would you like to buy the rat bucket, buy rats, sell rats, or end your turn?  Example: "buy 5" or "Sell 2" or "done" or "buy rat bucket"
done

----------------------------
Alice has $192 and 4 rats.
Bob has $200 and 0 rats.
The market price of a rat is $2.
There is no market history.
The rat bucket has been in play for 0 turns.
----------------------------

Bob, would you like to buy the rat bucket, buy rats, sell rats, or end your turn?  Example: "buy 5" or "Sell 2" or "done" or "buy rat bucket"
Buy 10
***Bob buys 10 rats at a price of $20.***

Bob, would you like to buy the rat bucket, buy rats, sell rats, or end your turn?  Example: "buy 5" or "Sell 2" or "done" or "buy rat bucket"
done

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A RAT IS ADDED TO THE RAT BUCKET
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

**********Turn 2: Bob begins***********  

----------------------------
Alice has $192 and 2 rats.
Bob has $180 and 10 rats.
The market price of a rat is $5.
Market History: $2 ^ $5
The rat bucket has been in play for 1 turns.
----------------------------

Alice, would you like to buy the rat bucket, buy rats, sell rats, or end your turn?  Example: "buy 5" or "Sell 2" or "done" or "buy rat bucket"
Sell 3

***Alice sells 3 rats at a price of $15.***

Alice, would you like to buy the rat bucket, buy rats, sell rats, or end your turn?  Example: "buy 5" or "Sell 2" or "done" or "buy rat bucket"
done

Alice has $207 and 1 rats.
Bob has $180 and 10 rats.

----------------------------
The market price of a rat is $5.
Market History: $2 ^ $5
The rat bucket has been in play for 1 turns.
----------------------------

Bob, would you like to buy the rat bucket, buy rats, sell rats, or end your turn?  Example: "buy 5" or "Sell 2" or "done" or "buy rat bucket"
Buy 10

***Bob buys 10 rats at a price of $20.***

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A RAT IS ADDED TO THE RAT BUCKET
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

<etc.  Continue until someone has $1000.>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.