User Tools

Site Tools


bingo

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
bingo [2021/05/01 16:31] frchrisbingo [2021/05/02 09:40] frchris
Line 4: Line 4:
  
 It's not just a song from summer camp, its an old-timey game: Here is a [[https://www.youtube.com/watch?v=nGCEpUAnkSg|Video Explaining the rules]] It's not just a song from summer camp, its an old-timey game: Here is a [[https://www.youtube.com/watch?v=nGCEpUAnkSg|Video Explaining the rules]]
 +
 +=== BingoBallHopper ===
 +
  
 First we will make a ''BingoBallHopper'' class that will make all 75 bingo balls, and randomly selecting them one at a time, kepping track of which ones were called.  To save time here is the {{ ::bingoball.java |BingoBall.java}} class, the {{ ::bingohoppertester.java |BingoHopperTester}}, and the starter code {{ ::bingohopper.java |BingoHopper.java}}.  You just have to finish the constructor, the ''nextBall()'' method and ''called() method'' Read the comments above each for the details. First we will make a ''BingoBallHopper'' class that will make all 75 bingo balls, and randomly selecting them one at a time, kepping track of which ones were called.  To save time here is the {{ ::bingoball.java |BingoBall.java}} class, the {{ ::bingohoppertester.java |BingoHopperTester}}, and the starter code {{ ::bingohopper.java |BingoHopper.java}}.  You just have to finish the constructor, the ''nextBall()'' method and ''called() method'' Read the comments above each for the details.
  
-Next ''BingoCell'' class, then a ''BingoCard'' class, and finally we will make a ''BingoGame'' class.+{{::hoppertesterpic.png?400|}} 
 + 
 +=== BingoCard/BingoCell === 
 + 
 +Next we turn to the player's Bingo cards.  We will make a clickable box for each square that we'll call the ''BingoCell'' class, then make 5x5 grid of these which we will call the ''BingoCard'' class. Finally we will make a ''BingoGame'' class that will put all these elements together.
  
 The ''BingoCell'' class would be a subclass of {{ ::cell.java |Cell}}  that would add the attributes of a number and a font. It will have its own draw method that can draw its number.  Here is a hint on how to build upon the draw method of the parent class: {{::drawhint.png?200|}} For now, let a cell that is "off" represent an uncalled number, and a "on" cell be one that the player has clicked on when that number is called. Later you may wish represent a called number differently. The class should have the following: The ''BingoCell'' class would be a subclass of {{ ::cell.java |Cell}}  that would add the attributes of a number and a font. It will have its own draw method that can draw its number.  Here is a hint on how to build upon the draw method of the parent class: {{::drawhint.png?200|}} For now, let a cell that is "off" represent an uncalled number, and a "on" cell be one that the player has clicked on when that number is called. Later you may wish represent a called number differently. The class should have the following:
Line 32: Line 39:
  
 The draw method can be tested by a ''BingBoardTester'' that you could start by adapting the ''CellTester'' code. The draw method can be tested by a ''BingBoardTester'' that you could start by adapting the ''CellTester'' code.
 +
 +=== BingoGame ===
  
 The ''BingoGame'' class can have one or more BingoBoards and random numbers from 1-75 can be "called out." These are randomly selected, but each number can only be called out once.  The number called is only on the screen temporarily (you probably want to use the javax.swing.Timer like the [[https://mathorama.com/apcs/pmwiki.php?n=Main.SimonGame|Simon Game]] The ''BingoGame'' class can have one or more BingoBoards and random numbers from 1-75 can be "called out." These are randomly selected, but each number can only be called out once.  The number called is only on the screen temporarily (you probably want to use the javax.swing.Timer like the [[https://mathorama.com/apcs/pmwiki.php?n=Main.SimonGame|Simon Game]]
bingo.txt · Last modified: 2021/05/10 12:08 by frchris

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki