//GameBoard.java import java.awt.*; class GameBoard extends Canvas { // the example supports only two valid states public static final byte INVALID = -1; public static final byte STATE0 = 0; public static final byte STATE1 = 1; public GameBoard(int width, int height, byte[][] board) { this.board = board; setSize(new Dimension(width, height)); } // draw the cells of the board public void paint(Graphics g) { for (int row = 0; row