Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Piece GetEmptyPiece()
- {
- for (int i = 0; i < pieces.Count; i++)
- {
- if (pieces[i].IsEmpty == true)
- {
- return pieces[i];
- }
- }
- return null;
- }
- public Piece GetPiece(int[] currPos)
- {
- for (int i = 0; i < pieces.Count; i++)
- {
- int[] pieceICurrPos = pieces[i].CurrPos;
- if ((pieceICurrPos[0] == currPos[0]) && (pieceICurrPos[1] == currPos[1]))
- {
- return pieces[i];
- }
- }
- return null;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement