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 13:49] frchrisbingo [2021/05/06 16:49] frchris
Line 8: Line 8:
  
  
-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, keeping 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.
  
 {{::hoppertesterpic.png?600|}} {{::hoppertesterpic.png?600|}}
Line 14: Line 14:
 === 2. BingoCell === === 2. 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. +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 ''BingoBoard'' 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 do one of the Constructors: 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:
Line 39: Line 39:
 {{::screen_shot_2021-05-02_at_7.55.50_am.png?600|}} {{::screen_shot_2021-05-02_at_7.55.50_am.png?600|}}
  
-=== 3. BingoCard ===+=== 3. BingoBoard ===
  
-The ''BingoCard'' class will need:+The ''BingoBoard'' class will need:
   - the line ''import java.awt.*;''   - the line ''import java.awt.*;''
   - a 2-D array of BingoCells called ''board''   - a 2-D array of BingoCells called ''board''
Line 62: Line 62:
 {{::simpletester.png?600|}} {{::simpletester.png?600|}}
  
-The draw method can be tested by a ''BingoBoardTester'' that you could start by adapting the ''CellTester'' code.+The draw method can be tested by {{ ::bingoboardtester.java |BingoBoardTester}}  that might look like this: 
 +{{::screen_shot_2021-05-06_at_11.29.45_am.png?600|}}
  
 === 4. BingoGame === === 4. BingoGame ===
bingo.txt · Last modified: 2021/05/10 12:08 by frchris

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki