<commit_before>package com.ookamijin.cheskers;

import com.ookamijin.framework.Input.TouchEvent;

public class Board {

	// these are the centers of the squares
	public static int x[] = { 200, 280, 360, 440, 520, 600 };
	public static int y[] = { 40, 120, 200, 280, 360, 440 };

	private Tile mTile[][];

	private ChipYellow yellowChips[] = new ChipYellow[16];
	private ChipRed redChips[] = new ChipRed[16];

	public Board() {

		mTile = new Tile[6][6];
		int tNum = 0;

		// populates the tile array with coordinate information
		for (int j = 0; j < 6; ++j) {
			for (int i = 0; i < 6; ++i) {
				mTile[i][j] = new Tile(x[i], y[j]);
			}
		}

		// initial board layout colors
		for (int j = 0; j < 6; ++j) {
			for (int i = 0; i < 6; ++i) {

				switch (j) {
				case 0:
				case 2:
				case 4:
					mTile[i][j].setHasYellow(true);

					break;
				case 1:
				case 3:
				case 5:
					mTile[i][j].setHasRed(true);
					break;
				}

				// TODO don't know if this will work correctly
				if (j == 2 && i == 2 || j == 2 && i == 3 || j == 3 && i == 2
						|| j == 3 && i == 3) {
					mTile[i][j].setHasNothing(true);
				}
			}
		}
		// initialize chip ids
		int yellow = 0;
		int red = 0;
		for (int j = 0; j < 6; ++j) {
			for (int i = 0; i < 6; ++i) {

				if (mTile[i][j].hasYellow()) {
					mTile[i][j].setChipIndex(yellow);
					++yellow;
				}
				if (mTile[i][j].hasRed()) {
					mTile[i][j].setChipIndex(red);
					++red;
				}
			}
		}

		// set bonus squares
		mTile[1][1].setBonusYellow(true);
		mTile[2][1].setBonusYellow(true);
		mTile[4][2].setBonusYellow(true);
		mTile[4][3].setBonusYellow(true);
		mTile[1][4].setBonusYellow(true);
		mTile[2][4].setBonusYellow(true);

		mTile[3][1].setBonusRed(true);
		mTile[4][1].setBonusRed(true);
		mTile[1][2].setBonusRed(true);
		mTile[1][3].setBonusRed(true);
		mTile[4][4].setBonusRed(true);
		mTile[3][4].setBonusRed(true);

		// initialize chips (taken from game screen)
		for (int i = 0; i < 16; ++i) {
			yellowChips[i] = new ChipYellow(Board.topInitX(i),
					Board.topInitY(i), i);

			redChips[i] = new ChipRed(Board.botInitX(i), Board.botInitY(i), i);

		}

	}

	public void update() {
		for (int i = 0; i < 16; ++i) {
			yellowChips[i].update();

			redChips[i].update();

		}
	}

	public static int topInitX(int index) {
		return botInitX(index);<commit_msg>trying to fix stuff<commit_after>package com.ookamijin.cheskers;

import com.ookamijin.framework.Input.TouchEvent;

public class Board {

	// these are the centers of the squares
	public static int x[] = { 200, 280, 360, 440, 520, 600 };
	public static int y[] = { 40, 120, 200, 280, 360, 440 };

	private Tile mTile[][];

	private ChipYellow yellowChips[] = new ChipYellow[16];
	private ChipRed redChips[] = new ChipRed[16];

	public Board() {

		mTile = new Tile[6][6];
		int tNum = 0;

		// populates the tile array with coordinate information
		for (int j = 0; j < 6; ++j) {
			for (int i = 0; i < 6; ++i) {
				mTile[i][j] = new Tile(x[i], y[j]);
			}
		}

		// initial board layout colors
		for (int j = 0; j < 6; ++j) {
			for (int i = 0; i < 6; ++i) {

				switch (j) {
				case 0:
				case 2:
				case 4:
					mTile[i][j].setHasYellow(true);

					break;
				case 1:
				case 3:
				case 5:
					mTile[i][j].setHasRed(true);
					break;
				}

				// TODO don't know if this will work correctly
				if (j == 2 && i == 2 || j == 2 && i == 3 || j == 3 && i == 2
						|| j == 3 && i == 3) {
					mTile[i][j].setHasNothing(true);
				}
			}
		}
		// initialize chip ids
		int yellow = 0;
		int red = 0;
		for (int j = 0; j < 6; ++j) {
			for (int i = 0; i < 6; ++i) {

				if (mTile[i][j].hasYellow()) {
					mTile[i][j].setChipIndex(yellow);
					++yellow;
				}
				if (mTile[i][j].hasRed()) {
					mTile[i][j].setChipIndex(red);
					++red;
				}
			}
		}

		// set bonus squares
		mTile[1][1].setBonusYellow(true);
		mTile[2][1].setBonusYellow(true);
		mTile[4][2].setBonusYellow(true);
		mTile[4][3].setBonusYellow(true);
		mTile[1][4].setBonusYellow(true);
		mTile[2][4].setBonusYellow(true);

		mTile[3][1].setBonusRed(true);
		mTile[4][1].setBonusRed(true);
		mTile[1][2].setBonusRed(true);
		mTile[1][3].setBonusRed(true);
		mTile[4][4].setBonusRed(true);
		mTile[3][4].setBonusRed(true);

		// initialize chips (taken from game screen)
		for (int i = 0; i < 16; ++i) {
			yellowChips[i] = new ChipYellow(Board.topInitX(i),
					Board.topInitY(i), i);

			redChips[i] = new ChipRed(Board.botInitX(i), Board.botInitY(i), i);

		}

	}

	public void update() {
		for (int i = 0; i < 16; ++i) {
			yellowChips[i].update();

			redChips[i].update(); 

		}
	}

	public static int topInitX(int index) {
		return botInitX(index);
{'fraction_non_alphanumeric': 0.18735262593783494, 'fraction_numerical': 0.04287245444801715, 'mean_word_length': 2.8403292181069957, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4033924', 'n_tokens_mistral': 2404, 'n_tokens_neox': 1895, 'n_words': 462}