Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.52 KB | None | 0 0
  1.     def draw(game:Array[Int]):Unit = {
  2.       for (i <- 0 to 2) {
  3.         if (game(i) == -1) print('o')
  4.         else if(game(i) == 0) print('.')
  5.         else if(game(i) == 1) print('x')
  6.       }
  7.       print("\n")
  8.       for (i <- 3 to 5) {
  9.         if (game(i) == -1) print('o')
  10.         else if(game(i) == 0) print('.')
  11.         else if(game(i) == 1) print('x')
  12.       }
  13.       print("\n")
  14.       for (i <- 6 to 8) {
  15.         if (game(i) == -1) print('o')
  16.         else if(game(i) == 0) print('.')
  17.         else if(game(i) == 1) print('x')
  18.       }
  19.       println("\n")
  20.      
  21.      
  22.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement