<commit_before>﻿using Levolution.Reversi.Records;
using System.Linq;
using System;

namespace Levolution.Reversi
{
    public class TableCommands : ITableCommands
    {
        /// <summary>
        /// 
        /// </summary>
        public Table Table { get; }

        /// <summary>
        /// 
        /// </summary>
        public Player CurrentPlayer { get; private set; }

        /// <summary>
        ///
        /// </summary>
        /// <param name="table"></param>
        /// <param name="firstPlayer"></param>
        public TableCommands(Table table, Player firstPlayer = Player.Dark)
        {
            Table = table;
            CurrentPlayer = firstPlayer;

            UpdatePlaceableCells(firstPlayer);
        }

        private void UpdatePlaceableCells(Player player)
        {
            ResetPlaceableCells();
            foreach (var pt in Table.GetPlaceableCells(player))
            {
                Table.GetCell(pt).IsPlaceable = true;
            }
        }

        private void ResetPlaceableCells()
        {
            foreach(var cell in Table.Cells)
            {
                cell.IsPlaceable = false;
            }
        }

        public void MoveDown() => Move(1, 0);

        public void MoveLeft() => Move(0, -1);
<commit_msg>fix: unused using.<commit_after>﻿using Levolution.Reversi.Records;
using System.Linq;

namespace Levolution.Reversi
{
    public class TableCommands : ITableCommands
    {
        /// <summary>
        /// 
        /// </summary>
        public Table Table { get; }

        /// <summary>
        /// 
        /// </summary>
        public Player CurrentPlayer { get; private set; }

        /// <summary>
        ///
        /// </summary>
        /// <param name="table"></param>
        /// <param name="firstPlayer"></param>
        public TableCommands(Table table, Player firstPlayer = Player.Dark)
        {
            Table = table;
            CurrentPlayer = firstPlayer;

            UpdatePlaceableCells(firstPlayer);
        }

        private void UpdatePlaceableCells(Player player)
        {
            ResetPlaceableCells();
            foreach (var pt in Table.GetPlaceableCells(player))
            {
                Table.GetCell(pt).IsPlaceable = true;
            }
        }

        private void ResetPlaceableCells()
        {
            foreach (var cell in Table.Cells)
            {
                cell.IsPlaceable = false;
            }
        }

        public void MoveDown() => Move(1, 0);

        public void MoveLeft() => Move(0, -1);

{'fraction_non_alphanumeric': 0.11610633307271306, 'fraction_numerical': 0.003127443315089914, 'mean_word_length': 1.4534995206136145, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 27, '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': '2472884', 'n_tokens_mistral': 684, 'n_tokens_neox': 655, 'n_words': 149}