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/02 09:40] frchrisbingo [2021/05/02 10:33] frchris
Line 3: Line 3:
  
  
-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]]. We will start with the machine that randomly chooses the Bingo Ball to be called.  Next we will generate the player's BingoCard which the user needs to mark until a winning Bingo pattern is made.  Finally we will make a ''BingoGame'' class that will put all these elements together by showing the called numbers, the player's BingoCards and a BINGO button if the player thinks they have a winning Bingo Pattern.
  
 === BingoBallHopper === === BingoBallHopper ===
Line 14: Line 14:
 === BingoCard/BingoCell === === 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 a 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.+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 a 5x5 grid of these which we will call the ''BingoCard'' class. 
  
-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 do one of the Constructors: 
 + 
 +{{::screen_shot_2021-05-02_at_7.30.48_am.png?600|}} 
 + 
 +Here is a hint on how to build upon the draw method of the parent class:  
 + 
 +{{::screen_shot_2021-05-02_at_7.32.37_am.png?600|}} 
 + 
 +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:
   - Constructors that can will allow a client class to initialize the digit (the number 0 can be used as the center "free" cell   - Constructors that can will allow a client class to initialize the digit (the number 0 can be used as the center "free" cell
   - accessor methods so a client class can know a cell's number   - accessor methods so a client class can know a cell's number
    
-You can test out your BingoCell class by adapting {{ ::celltester.java |CellTester.java}} to construct new ''BingoCell''s in the ''resetCells()'' method.  The rest would not need to be changed since a ''BingoCell'' is a ''Cell'' Eventually, your ''BingoBoard'' class would be the ultimate test of your ''BingoCell'' class!+You can test out your BingoCell class by adapting {{ ::celltester.java |CellTester.java}} to construct new ''BingoCell''s in the ''resetCells()'' method.   
 + 
 +{{::screen_shot_2021-05-02_at_7.26.45_am.png?600|}} 
 + 
 +The rest would not need to be changed since a ''BingoCell'' is a ''Cell'' Eventually, your ''BingoBoard'' class would be the ultimate test of your ''BingoCell'' class!
  
  
bingo.txt · Last modified: 2021/05/10 12:08 by frchris

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki