Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Arrays;
- import java.util.*;
- public class SpelBord
- {
- // instance variables - vervang deze door jouw variabelen
- String[][] spelBordArray = new String [12][9];
- public SpelBord(){
- this.initBoard();
- }
- public void initBoard(){
- for (int row=0; row<=11; row++){
- for (int col=0; col<=3; col++){
- spelBordArray[row][col]="*";
- }
- spelBordArray[row][4]=" ";
- for (int col=5; col<=8; col++){
- spelBordArray[row][col]="*";
- }
- }
- }
- public void printBoard(){
- for (int row=0; row<=11; row++){
- for (int col=0; col<=8; col++){
- System.out.print(spelBordArray[row][col] + " ");
- }
- System.out.println("");
- }
- }
- public String[][] getArray(){
- return spelBordArray;
- }
- }
Add Comment
Please, Sign In to add comment