Flourishing prototype

Challenge
No

Flourishing is a game I'm working on. It helps players learn how to have a better life. You play Spinel, a dragon learning about humans with the help of some other cryptids.

Spinel

There are three islands in the prototype. Here's one:

An island

Each island is about one topic:

  • Getting started
  • Brains
  • Romance

Each island has seeds. When Spinel interacts with a seed, a conversation starts, where Spinal learns something about humans. For example:

Conversation

Here the number of seeds on each island:

  • Getting started: 9 seeds
  • Brains: 14 seeds
  • Romance: 12 seeds

Write a program to estimate the amount of memory the game will need to run, using the following formula:

memory (MB) = 500 + 3 * (total seeds) + 8 * (seeds finished by player)

So if the player has seen 10 seeds in total, the program will need...

500 + 3 * (9 + 14 + 12) + 8 * 10

... megabytes of memory.

(The formula isn't realistic, but it's easy.)

Your program should:

  • Ask the user for seeds completed on each island, and report memory needed for that case.
  • Tell the user whether the player has finished each island.
  • Warn the user when the memory used by the game exceeds a target value of 750 MB.

Here's a sample run:

  • Flourishing prototype memory load
  • =================================
  •  
  • Getting Started seeds completed? 9
  • Brains seeds completed? 7
  • Romance seeds completed? 0
  •  
  • Zone completion
  •  
  • Getting started: completed
  • Brains: not completed
  • Romance: not completed
  •  
  • Total seeds completed: 16
  • Memory needed : 733 MB

Another:

  • Flourishing prototype memory load
  • =================================
  •  
  • Getting Started seeds completed? 9
  • Brains seeds completed? 14
  • Romance seeds completed? 8
  •  
  • Zone completion
  •  
  • Getting started: completed
  • Brains: completed
  • Romance: not completed
  •  
  • Total seeds completed: 31
  • Memory needed : 853 MB
  •  
  • Warning: target memory exceeded

Upload your solution here, not to Moodle. The usual coding standards apply.

Where referenced