void drawEmptyBoard ( Graphics g ) { int x = x_offset , y = y_offset ; Color old_col = g . getColor ( ) ; g . setFont ( def_font2 ) ; old_col = g . getColor ( ) ; g . setColor ( checksum_col ) ; g . drawString ( ( "Checksum: " + checksum ) , x_offset + field_size , y_offset - 20 ) ; g . setFont ( def_font ) ; g . setColor ( old_col ) ; for ( int i = 0 ; i < num_fields ; i ++ ) { for ( int j = 0 ; j < num_fields ; j ++ ) { // draws 1 row g . drawRect ( x , y , field_size , field_size ) ; x += field_size ; } g . drawString ( ( String . valueOf ( ( num_fields - i - 1 ) ) ) , x + 20 , y + field_size / 2 ) ; y += field_size ; x = x_offset ; } for ( int i = 0 ; i < num_fields ; i ++ ) { g . drawString ( ( String . valueOf ( i ) ) , x_offset + i * field_size + field_size / 2 , y + 30 ) ; } }
Draws the empty board no pieces on it yet just grid lines