Skip to content

katherinemat/lemonade-stand

Repository files navigation

Lemonade Stand

Lemonade Stand Game, 03/6/2017

By Kaz Matthews, Tammy Dang, Elise St Hilaire

Description

Lemonade Stand is an educational game that inspires young entrepreneurs to take risks and fundraise. The player has a certain time period to turn a profit and meet their goals. Each day presents the player with new circumstances, including weather and the cost to make a pitcher of lemonade. The player must decide how much lemonade to make and at what price. Lemonade stand simulates a day of sales and returns the cups sold and the profit for the day. At the end of the time period, the program returns whether the player met their goals and how they did in comparison with other players.

Setup/Installation Requirements

Create database In SQLMD:

  • > CREATE DATABASE lemonade_stand;
  • > GO
  • > USE lemonade_stand;
  • > GO
  • > CREATE TABLE players (id INT IDENTITY(1,1), username VARCHAR(255), password VARCHAR(255), money DECIMAL(9,2), count INT);
  • > GO
  • > CREATE TABLE players_scores (id INT IDENTITY(1,1), player_id INT, score DECIMAL(9,2));
  • > GO

Game Object Specs

Generate random temperature.

  • Output = _temperature = random number between 30-100

Generate random forecast

  • Output: _weather = Cloudy;

Generate price per pitcher between $0.50 - $3.00.

  • Output: _pricePerPitcher = 2;

Make cups per pitcher equal to 10

  • Output: _cupsPerPitcher = 10;

Make Game.Play() method

  • Input: Game.Play(pricePerCup, numberOfPitchers);
  • Output: cups sold = 25;

Save score to database

  • Input: Game.Save();
  • Output: add saved score = $30.00 to database;

Save score to database with username

  • Input: Game.Save(username);
  • Output: add saved score and username to database;

Save score to database with username and password

  • Input: user saves Game
  • Output: update saved score to database where username and password = player's username and password

Known Bugs

If money made is negative number, gets displayed as parenthesis instead of with - in front. Error message if user without account tries to login as returning player does not show up anymore. also, can create duplicate player accounts. Formula for how many cups are sold is off.

Support and contact details

Please don't contact us.

Technologies Used

I used C# with the Nancy framework and Razor. I used SQL to create the database. I also relied on Bootstrap.

License

MIT

Copyright (c) 2017 Tammy Dang, Kaz Matthews, Elise St Hilaire

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published