Shenzhen I/O Wiki

◀ Back to conceptMAIL

In this email, you get an assignment to make a scorekeeper for a drinking game.

Transcript[]

Before completion[]

Joe BRING OUT THE BARON!!

From: Joe (周海涛) <joe@longteng-co-ltd.gd.cn>

The BARON VON SCHNAPPS is in the house y’all!! I was out drinking last night and met someone from the company that owns this brand. There’s a drinking game they’re promoting that’s hella fun and off the rails!! I made a deal to supply them with little personal scorekeepers they can give away at their events.
Carl Re: BRING OUT THE BARON!!

From: Carl Tesky <carl@longteng-co-ltd.gd.cn>

Wait, what’s the game? What counts as a point? What would be a foul?

Surely not individual drinks…

Joe Re: BRING OUT THE BARON!!

From: Joe (周海涛) <joe@longteng-co-ltd.gd.cn>

I don’t remember the actual rules. Haha!

After completion[]

Lili Re: BRING OUT THE BARON!!

From: Wu Lili 吴丽丽 <wulili@longteng-co-ltd.gd.cn>

If you can’t remember the rules of the game you were playing, how sure are you that you actually made the deal?
Joe Re: BRING OUT THE BARON!!

From: Joe (周海涛) <joe@longteng-co-ltd.gd.cn>

Because they sent us a case with a variety of flavors!!

It’s very tasty stuff, come try some!

Carl Re: BRING OUT THE BARON!!

From: Carl Tesky <carl@longteng-co-ltd.gd.cn>

It’s already too late for me, but you can still save yourselves… heed my warning, do not drink of the Baron von Schnapps…

Bye then. See you in the next life.

Puzzle[]

In this assignment, you must make a scorekeeper that adds 1 when point is pressed and sub 2 when foul is pressed.

Drinking Game

Drinking game scorekeeper

Description[]

  • point and foul are simple inputs connected to buttons.
  • display is an XBus display output corresponding to a numeric LCD screen.
  • The counter should keep track of a count, starting at 0, and ensure that the display is always showing the current value.
  • When point is pushed the count should be incremented by 1.
  • When foul is pushed the count should be decremented by 2, but not below 0.