You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.4 KiB
47 lines
1.4 KiB
using ClassLib000.Chess;
|
|
using System;
|
|
|
|
namespace ConsoleCore
|
|
{
|
|
class ChessConsoler
|
|
{
|
|
public static void ChessRedrawBrokenFigures(ChessGame game)
|
|
{
|
|
Figure[] arWhite = game.WhitePlayer.GetBrokenFigures();
|
|
Figure[] arBlack = game.BlackPlayer.GetBrokenFigures();
|
|
//
|
|
}
|
|
|
|
public static void ChessRedrawBoard(ChessGame game)
|
|
{
|
|
Console.Clear();
|
|
ChessDrawBoard();
|
|
ChessDrawFigures(game.BlackPlayer, ConsoleColor.Green);
|
|
ChessDrawFigures(game.WhitePlayer, ConsoleColor.Blue);
|
|
}
|
|
|
|
private static void ChessDrawFigures(Player player, ConsoleColor color)
|
|
{
|
|
ChessDrawSingleFigure(player.Пешка1, color);
|
|
ChessDrawSingleFigure(player.Пешка2, color);
|
|
ChessDrawSingleFigure(player.Пешка3, color);
|
|
ChessDrawSingleFigure(player.Пешка4, color);
|
|
// ..
|
|
|
|
}
|
|
|
|
private static void ChessDrawSingleFigure(Figure fig, ConsoleColor color)
|
|
{
|
|
int x = fig.X;
|
|
int y = fig.Y;
|
|
EColor figureColor = fig.Color;
|
|
EFigureType ft = fig.Type;
|
|
// TODO: .. Console.SetCursorPosition(posx, posy);
|
|
}
|
|
|
|
private static void ChessDrawBoard()
|
|
{
|
|
// throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|
|
|