Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.
/ ac-turnip-calculator Public archive

💰 Calculator for turnip buy price and tipping - written using React and TypeScript

License

Notifications You must be signed in to change notification settings

Coteh/ac-turnip-calculator

Repository files navigation

ac-turnip-calculator

CircleCI codecov

A simple React application I made to quickly calculate total amount of bells the Nooklings will spend on your turnips given the buy price and quantity of turnips. It will also calculate how much to tip, in the case that you are on another player's island and want to tip them.

Preview

Motivation

When travelling to other players' islands via r/acturnips to sell turnips, players can choose to provide the hosting player a tip, which would be a percentage of their earnings. It is certainly not required to tip at all, but I do it because the player took time out of their day to host their island and I want to give something to them in return.

When figuring out how many bells to leave for the player, I found myself having to do quick mental maths and opening a calculator every time. I wanted to build a tool that automatically did it so I can save time.

Features

  • Allows for input of the following items:
    • Turnip price
    • Number of turnips (4000, a full inventory of 10x turnips, by default)
    • Tip percentage (Community standard of 10% is set as the default)
  • Calculates the following:
    • Amount of bells the Nooklings will pay you for your turnips given the price and quantity
    • Amount of bells to tip the player, given buy price and tip percentage

Future Additions

  • Calculate profit (based off of original Daisy Mae price) #26
  • Port to React Native

Non-Features

  • Calculates turnip price trajectories (use Turnip Prophet for that instead)

Setup

Development

You can run the following to start the server in development mode: (standard CRA setup atm)

yarn start

Build

Run the following command to build web app for production:

yarn build

Web app will be built to the build directory.

Running Tests

Run the following command to run tests:

yarn test