Exemplo n.º 1
0
        public void ShowMoves(IChessman chessman)
        {
            IChessmanMovement chessmanMovement = chessman.Play();
            IPosition         fromPosition     = _chessmansDictionary[chessman];

            foreach (var position in chessmanMovement.GetPossibleMoves(fromPosition, ChessTable))
            {
                Console.WriteLine(position);
            }
        }
Exemplo n.º 2
0
 public void PutChessmanOnChessTable(IChessman chessman, IPosition position)
 {
     ChessTable.SetChessman(chessman, position);
     _chessmansDictionary.Add(chessman, position);
 }