Giter Club home page Giter Club logo

universal_paperclips's Introduction

I didn't write this.

I'm hacking on the source code of http://www.decisionproblem.com/paperclips/ for fun. The eventual goal is to split into a frontend and backend module with event subscriptions, such that the game can be "played" programmatically.

If you want the original game (as of 10/10/17 when I saved the files from my browser), check out the vanilla branch.

Changes made:

  • Uncommented the cheat buttons
  • Made cheats increase exponentially so that they could keep up with the game
  • Fixed +1 trust button for when that's expressed via drone gifts instead

universal_paperclips's People

Contributors

ianfixes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

universal_paperclips's Issues

Standardize sale price adjustment

currently done strangely

function raisePrice(){
    margin = (Math.round((margin + .01)*100))/100;
    document.getElementById("demand").innerHTML = demand.toFixed(2);
    document.getElementById("margin").innerHTML = margin.toFixed(2);
}

function lowerPrice(){
    if (margin >= .01){
    margin = (Math.round((margin - .01)*100))/100;
    document.getElementById("demand").innerHTML = demand.toFixed(2);
    document.getElementById("margin").innerHTML = margin.toFixed(2);
    }
}

Demand is displayed different ways in different places

I'm not entirely sure about the reason for the discrepancy here

document.getElementById("demand").innerHTML = demand.toFixed(2);

and elsewhere,

document.getElementById("demand").innerHTML = (demand*10).toLocaleString(undefined, {minimumFractionDigits: 0, maximumFractionDigits: 0});

It could be that this meant to compensate for "Demand per second", but I'm unsure. In any case, demand of less than 1.37 will result in 0 clips sold.

    avgSales = chanceOfPurchase * (.7*Math.pow(demand,1.15))*10;

vs

        if (Math.random() < (demand/100)){
            sellClips(Math.floor(.7 * Math.pow(demand, 1.15)));
            }

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.