Beispiel #1
0
 private void Flip(Zet zet)
 {
     if (IsValidPosition(zet.X, zet.Y))
     {
         this.TempBoard[zet.X, zet.Y] = this.aanDeBeurt;
     }
 }
Beispiel #2
0
        public void SetTurn(Zet zet)
        {
            var board = JsonConvert.DeserializeObject <int[, ]>(this.bord);

            this.TempBoard = board;
            if (this.CheckAround(zet.X, zet.Y) == true)
            {
                this.TempBoard[zet.X, zet.Y] = this.aanDeBeurt;

                CheckToFlip(zet.X, zet.Y);
                this.bord = JsonConvert.SerializeObject(this.TempBoard);
                if (CanTurn())
                {
                    GiveTurn();
                }
            }
        }