mirror of
https://github.com/Earth-Genesis-Games/Ajedrez_Purgatorio.git
synced 2026-09-11 09:47:35 +00:00
- Fix 9 CS0101 duplicate classes between Mono/ and Mono/Classic/ - BoardManager -> ClassicBoardManager, SquareClick -> ClassicSquareClick - Delete duplicate Piece/Pawn/King/Queen/Rook/Bishop/Knight from Classic/ - Merge GetAttackSquares into Piece base class with overrides - Fix King castling: reject castling through/while in check - Assign URP pipeline to QualitySettings (6 levels) and GraphicsSettings - Fix template identifiers (DefaultCompany -> EarthGenesisGames) - Delete orphaned SampleScene.unity and duplicate URP assets - Fix test assembly reference (Assembly-CSharp -> AjedrezPurgatorio.Runtime) - Remove 11 unused packages (multiplayer, visualscripting, terrain, etc.) - Update BoardInputSystemSpike for ClassicSquareClick - Write unit tests: CheckDetector, DrawDetector, MoveValidator - Fix BalanceConfig JSON structure to match C# class fields - Update stale documentation (~30 files) - architecture.md, ADR-0001, roadmap, gate-check, EPIC.md - PROJECT_STATUS.md, BLOQUEADORES_JUGABILIDAD.md - tech-debt-register.md - Add Unity Editor setup guide (production/UNITY_EDITOR_SETUP.md)
37 lines
858 B
C#
37 lines
858 B
C#
|
|
|
|
// ✅ PieceCombat.cs
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class PieceCombat : MonoBehaviour
|
|
{
|
|
public bool isWhite;
|
|
public Vector2Int currentPos;
|
|
public bool hasMoved = false;
|
|
|
|
public virtual List<Vector2Int> GetAvailableMoves(PieceCombat[,] board)
|
|
{
|
|
return new List<Vector2Int>();
|
|
}
|
|
|
|
protected bool IsInsideBoard(Vector2Int pos)
|
|
{
|
|
return pos.x >= 0 && pos.x < 8 && pos.y >= 0 && pos.y < 8;
|
|
}
|
|
|
|
public void ShowMoves()
|
|
{
|
|
var moves = GetAvailableMoves(GameManagerCombat.Instance.board);
|
|
BoardManagerCombat.Instance.HideAllIndicators();
|
|
foreach (var move in moves)
|
|
{
|
|
BoardManagerCombat.Instance.ShowIndicator(move);
|
|
}
|
|
}
|
|
|
|
public void HideMoves()
|
|
{
|
|
BoardManagerCombat.Instance.HideAllIndicators();
|
|
}
|
|
} |