140 likes | 293 Views
Cupcake. Group: Jeansun Lee David Coulthart Jennifer Lee Russell Irving Klopfer, IV Alan Yeung. Outline. Introduction (jeansun) Structure of Cupcake (dave) Sample Program (jenly/GUI) Testing (russ) Tools Used (alan) Future Development (alan) What We Learned (jeansun). Introduction.
E N D
Cupcake Group: Jeansun LeeDavid CoulthartJennifer LeeRussell Irving Klopfer, IVAlan Yeung
Outline • Introduction (jeansun) • Structure of Cupcake (dave) • Sample Program (jenly/GUI) • Testing (russ) • Tools Used (alan) • Future Development (alan) • What We Learned (jeansun)
Introduction • Purpose: create simple board games • Example: CandyLand • Kid-friendly language • Easy, fun way to learn computer programming • Target language: Java
Structure of Cupcake • Four basic components: • Setup{…} • Start{…} • Turn{…} • Win{…}
Structure of Cupcake • Reserved objects • Dice • Board • Players • CurrentPlayer
Structure of Cupcake • Internal functions • Say • Ask • RollDice • MoveAhead • MoveBack • MoveTo
Structure of Cupcake • Grammar similar to Java • Support if, while, • But simpler
Setup { Board.Spaces = 100; Dice.Sides = 6; Dice.Number = 1; } Start { Ask "How many players?", Players.Number; for i = 1 to Players.Number { Ask "Please enter player " + i + "s name.", Players[i].Name; } } Turn { RollDice; MoveAhead Dice.Value; if (CurrentPlayer.Space == 89) { MoveTo 50; } } Win { if (CurrentPlayer.Position >= Board.End) { if (CurrentPlayer.Points >= 20) { Say "You won"; } else { MoveTo CurrentPlayer.PreviousPosition; } } } Sample Program
Sample Program • Screenshots
Tools Used • ANTLR
Future Development • Simpler programming interface • Support for more kinds of board games • Improved GUI • Animation, sound effects, etc.
What We Learned • Time management is hard • Collaboration is uber hard • Russell and Alan sleep a lot • Food is imperative during meetings • Most Difficult Concept: -blah
Thanks • Chun Li, our helpful TA • Professor Aho • Terence Parr, aka Mr. ANTLR • The Russell Irving Klopfers, I, II, & III