public void PlacePiece(int space, Player.Piece piece) { if (IsSpaceFree(space)) { _playingGrid[space] = piece; } }
private static bool HasPieceWon(Player.Piece[] boardState, Player.Piece piecetoCheck) { if (boardState[0] == piecetoCheck && boardState[1] == piecetoCheck && boardState[2] == piecetoCheck) { return(true); } if (boardState[3] == piecetoCheck && boardState[4] == piecetoCheck && boardState[5] == piecetoCheck) { return(true); } if (boardState[6] == piecetoCheck && boardState[7] == piecetoCheck && boardState[8] == piecetoCheck) { return(true); } if (boardState[0] == piecetoCheck && boardState[3] == piecetoCheck && boardState[6] == piecetoCheck) { return(true); } if (boardState[0] == piecetoCheck && boardState[3] == piecetoCheck && boardState[6] == piecetoCheck) { return(true); } if (boardState[1] == piecetoCheck && boardState[4] == piecetoCheck && boardState[7] == piecetoCheck) { return(true); } if (boardState[2] == piecetoCheck && boardState[5] == piecetoCheck && boardState[8] == piecetoCheck) { return(true); } if (boardState[2] == piecetoCheck && boardState[4] == piecetoCheck && boardState[6] == piecetoCheck) { return(true); } return(false); }
public Square(Player.Piece ruta) { VärdeRuta = ruta; }
public void PlaceChange(Player.Piece field, int index) { spel[index].ChangeStatus(field); }
public void MakeMove(int space, Player.Piece piece, Board board) { board.PlacePiece(space, piece); _moveCounter++; }
public Player(Player.Piece piece) { PlayerPiece = piece; }
public Player(Player.Piece pla) { PlayerPiece = pla; }
public Square(Player.Piece empty) { CurrentPiece = empty; }
public void ChangeStatus(Player.Piece square) { PieceStatus = square; }
public Square(Player.Piece play) { PieceStatus = play; }