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 12:43] frchrisbingo [2021/05/01 16:20] frchris
Line 11: Line 11:
   - 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 resetCell 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.  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!
  
  
Line 24: Line 24:
       - The "O" column has 5 unique numbers from 61-75       - The "O" column has 5 unique numbers from 61-75
   - a toString method that has no parameters, and returns a string representation of the board that is similar to : {{::bingotext.png?200|}}   - a toString method that has no parameters, and returns a string representation of the board that is similar to : {{::bingotext.png?200|}}
-  - a draw method takes a Graphics parameter to draw the board 
   - a method 'hasBingo' (that returns a boolean) which detects a win for the rows, columns, and diagonals (later you can overload this with method that takes a parameter for the "blackout," "corners," or "box" variants)   - a method 'hasBingo' (that returns a boolean) which detects a win for the rows, columns, and diagonals (later you can overload this with method that takes a parameter for the "blackout," "corners," or "box" variants)
 +  - a draw method takes a Graphics parameter to draw the board
 +
 +The "Extreme Programming" approach is to begin by writing one or more  client classes of ''BingoBoard'' to test each of these specifications. The first 4 can be done with a text based application, starting off with a simple one like {{::simpletester.png?200|}}
 +
 +The draw method can be tested by a ''BingBoardTester'' that you could start by adapting the ''CellTester'' code.
 +
 +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]]
  
 +It is up to the player to "dob" or select the ones that are called.  There should be a bingo button for the player to press if they think they have a "Bingo".  
  
bingo.txt · Last modified: 2021/05/10 12:08 by frchris

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki