<commit_before>package reversi.models;

import base.models.Board;

public class ReversiBoard extends Board<ReversiPiece>{

	//TODO: Implement board
	
	//TODO: Create function that shows the board in ASCII
}<commit_msg>Work on DrawBoard and DrawElement<commit_after>package reversi.models;

import java.util.Map;

import base.models.Board;
import base.models.BoardPiece;
import base.models.Position;

public class ReversiBoard extends Board<ReversiPiece>{

	//TODO: Implement board
	
	//TODO: Create function that shows the board in ASCII
	
	private static final String[] columnAlpha = {"a","b","c","d","e","f","g","h"};
	
	public String DrawBoard(ReversiBoard board)
	{
		Map<Position, BoardPiece<ReversiPiece>> boardPieces = board.getBoardElements();
		
		StringBuilder builder = new StringBuilder();

		for (int c = 0; c < 8; c++) {

			String currentColumn = columnAlpha[c];
			
			builder.append(c);

			for (int r = 0; r < 8; r++) {
				
				builder.append("|");

				Integer currentRow = r;

				Position position = new Position(currentColumn, currentRow);

				BoardPiece<ReversiPiece> boardPiece = boardPieces.get(position);
				
				String representation = this.DrawElement(boardPiece);
				
				builder.append(representation);
			}

		}
		return board;

	}
		
	public String DrawElement(BoardPiece<ReversiPiece> piece)
	{
		String result = "";
		
		ReversiPiece reversiPiece = piece.getElement();
		
		if(reversiPiece == null)
			result = "_";
		else
			
		
		return result;
	}
	
}

{'fraction_non_alphanumeric': 0.11729222520107238, 'fraction_numerical': 0.002680965147453083, 'mean_word_length': 3.831715210355987, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, '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': '2756406', 'n_tokens_mistral': 563, 'n_tokens_neox': 464, 'n_words': 121}