<commit_before>/*
Copyright (c) 2015 <NAME>

This source file is licensed under the "MIT license”.
Please see the file COPYING in this distribution
for license terms.
*/
package samina.fourup;

import android.graphics.drawable.Drawable;
import android.view.View;
import android.widget.ImageView;

public class GameBoard implements GlobalConstants{

    Hole[][] holes;
    int turn = GCRed;
    int winner = GCBlack;
    int[] colors = new int[2];
    int[] overlays = new int[2];
    public boolean gameover = false;
    AI ai;
    int mode = GCPlayPass;

    private GameBoard(){}

    GameBoard(int numrows, int numcols,int mode){
        holes = new Hole[numrows][numcols];
        this.mode = mode;
        if(mode == GCPlayAI) {
            ai = new AI(new AIBoard(standardNumCols, standardNumRows, numDisksToWin));
        }
    }

    //Similar to a mediator pattern, receives the click event from one hole<commit_msg>Fixed the bug that made the game crash when disk was put in last column in PlayAI<commit_after>/*
Copyright (c) 2015 <NAME>

This source file is licensed under the "MIT license”.
Please see the file COPYING in this distribution
for license terms.
*/
package samina.fourup;

import android.graphics.drawable.Drawable;
import android.view.View;
import android.widget.ImageView;

public class GameBoard implements GlobalConstants{

    Hole[][] holes;
    int turn = GCRed;
    int winner = GCBlack;
    int[] colors = new int[2];
    int[] overlays = new int[2];
    public boolean gameover = false;
    AI ai;
    int mode = GCPlayPass;

    private GameBoard(){}

    GameBoard(int numrows, int numcols,int mode){
        holes = new Hole[numrows][numcols];
        this.mode = mode;
        if(mode == GCPlayAI) {
            ai = new AI(new AIBoard(standardNumRows, standardNumCols, numDisksToWin));
        }
    }

    //Similar to a mediator pattern, receives the click event from one hole
{'fraction_non_alphanumeric': 0.09375, 'fraction_numerical': 0.00625, 'mean_word_length': 3.1670281995661607, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '666420', 'n_tokens_mistral': 580, 'n_tokens_neox': 555, 'n_words': 205}