Exemple #1
0
 public void addStone(Stone s)
 {
     if (hand.Count < 7)
     {
         hand.Add(s);
     }
 }
 public Stone[] drawStones(int count)
 {
     Stone[] ret = new Stone[count];
     for (int i = 0; i < count; i++)
     {
         ret[i] = content.Pop();
     }
     return ret;
 }
Exemple #3
0
 public void addStones(Stone[] stones)
 {
     if (hand.Count + stones.Length < 8)
     {
         foreach (Stone s in stones)
         {
             hand.Add(s);
         }
     }
 }
 public void addStone(Stone s)
 {
     content.Push(s);
     shuffle();
 }
 public Stone placeStone(int x, int y, Stone s)
 {
     return board[x, y].placeStone(s);
 }
 private void resetChanges()
 {
     Stone[] stones = new Stone[changed.Count];
     int i = 0;
     foreach (Field f in changed)
     {
         stones[i] = f.getStone();
         board.removeStone(f.x,f.y);
         i++;
     }
     hand.addStones(stones);
     refreshBoard(board);
     refreshHand(hand);
     changed.Clear();
 }