Trade in your breakfast

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Trade in your breakfast

Post by MarauderIIC »

Just a lighthearted, windows-dependent toy console program I thought I'd share :) Dunno if anyone remembers the old Dannon Frusion Smoothie commercials.
Used to have the equivalent of this on my calculator (except it actually drew circles and lines :D). Threw this together in like 5 minutes 'cause my fiancee was remembering it, and I've misplaced my graphing calc for the moment.

Code: Select all

#include <iostream>
#include <string>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

using namespace std;

int main() {
	string a =
	"           __________________ \n"; a +=
	"          /   Trade in your  /\n"; a +=
	"         /					\n"; a +=
	"       O						\n"; a +=
	"     ,-|-[]					\n"; a +=
	"    / .|						\n"; a +=
	"     /  \\					\n";

	string b =
	"           __________________	\n"; b +=
	"          /  breakfast for   /	\n"; b +=
	"         /						\n"; b +=
	"    \\  O []					\n"; b +=
	"     `-|-+						\n"; b +=
	"       |.						\n"; b +=
	"      /  \\						\n";

	string c =
	"           __________________	\n"; c +=
	"          /   this Dannon    /	\n"; c +=
	"         /						\n"; c +=
	"       O 						\n"; c +=
	"     ,-|-[]					\n"; c +=
	"    / .|						\n"; c +=
	"     /  \\						\n";

	string d =
	"           __________________	\n"; d +=
	"          / Frusion Smoothie /	\n"; d +=
	"         /						\n"; d +=
	"    \\  O []					\n"; d +=
	"     `-|-+						\n"; d +=
	"       |.						\n"; d +=
	"      /  \\						\n";

	string e =
	"           __________________	\n"; e +=
	"          /                  /	\n"; e +=
	"         /						\n"; e +=
	"       O   					\n"; e +=
	"     --|-[]					\n"; e +=
	"       |						\n"; e +=
	"      / \\						\n";

	string *anim[] = {&a, &b, &c, &d, &e};

	for (size_t i = 0;GetAsyncKeyState(VK_SPACE) == 0;i++) {
		system("cls");
		i %= 5;
		cout << *anim[i];
		Sleep(750);
	}
	return 0;
}
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
User avatar
M_D_K
Chaos Rift Demigod
Chaos Rift Demigod
Posts: 1087
Joined: Tue Oct 28, 2008 10:33 am
Favorite Gaming Platforms: PC
Programming Language of Choice: C/++
Location: UK

Re: Trade in your breakfast

Post by M_D_K »

very nice ascii art 8-)

When I get home I'll port it :lol:
(i'm serious but it is funny)
Gyro Sheen wrote:you pour their inventory onto my life
IRC wrote: <sparda> The routine had a stack overflow, sorry.
<sparda> Apparently the stack was full of shit.
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: Trade in your breakfast

Post by dandymcgee »

Lol. Nice work marauder.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
sparda
Chaos Rift Junior
Chaos Rift Junior
Posts: 291
Joined: Tue Sep 23, 2008 3:54 pm

Re: Trade in your breakfast

Post by sparda »

Looks tight. I'll have to port it to Mac to see it work.

So is this the almighty ES animation system? :mrgreen:

No wonder Falco didn't want to talk about it!

:lol:
User avatar
ibly31
Chaos Rift Junior
Chaos Rift Junior
Posts: 312
Joined: Thu Feb 19, 2009 8:47 pm
Current Project: Like... seven different ones
Favorite Gaming Platforms: Xbox 360, Gamecube
Programming Language of Choice: C++, ObjC
Location: New Jersey.

Re: Trade in your breakfast

Post by ibly31 »

Oh, marauder! You have a graphing calc? I have a ti84+se. I program it all the time, I made. Pokemom clone in ti basic
Image
Twitter
Website/Tumblr
My Projects

The best thing about UDP jokes is that I don’t care if you get them or not.
User avatar
Kros
Chaos Rift Regular
Chaos Rift Regular
Posts: 136
Joined: Tue Feb 24, 2009 4:01 pm
Current Project: N/A
Favorite Gaming Platforms: PC, Playstation/2/3
Programming Language of Choice: C++
Location: Oregon,USA
Contact:

Re: Trade in your breakfast

Post by Kros »

ibly31 wrote:Oh, marauder! You have a graphing calc? I have a ti84+se. I program it all the time, I made. Pokemom clone in ti basic
I think its probably safe to assume anyone who has taken Algebra 2 (Math 95?) or higher has a graphing calc :).
Isaac Asimov wrote:Part of the inhumanity of the computer is that, once it is competently programmed and working smoothly, it is completely honest.
YouTube Channel
Post Reply