Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Jun 25th, 2018 61 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. AlphaBeta_Core thisState = new AlphaBeta_Core(fieldsForMiniMax, false);  
  2.                 AlphaBeta_Core next = thisState.FindNextMove(depth);
  3.                
  4.                 if (next != null)
  5.                 {
  6.                     Debug.WriteLine("WYBRANY SCORE: " + next.m_Score);
  7.                     idFieldToPlaceBall = Convert.ToInt32(next.Moves[0]);
  8.  
  9.                 }
  10.  
  11.                 if (idFieldToPlaceBall != null)
  12.                 {
  13.                     AssignBallTo(Convert.ToInt32(idFieldToPlaceBall), TakenBy.Computer);
  14.                     SwitchMoveOrder();
  15.  
  16.                     //var computerFieldsIds = fields.Where(cf => cf.TakenBy == TakenBy.Computer).Select(i => i.Id).ToList();
  17.                     foreach (var line in possibleThrees)
  18.                     {
  19.                     if (line.Where(l => getAssigment(l) == TakenBy.Computer).Count() == 3 && (line[0] == idFieldToPlaceBall || line[1] == idFieldToPlaceBall || line[2] == idFieldToPlaceBall))
  20.                         {
  21.                             TakePlayerBall();
  22.                         }
  23.                     }  
  24.                     Debug.WriteLine("Pushing ball MINIMAX.");
  25.                     return;
  26.                 }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top