forked from ClaytonSiby/tic-tac-toe
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitignore
More file actions
57 lines (46 loc) · 1.53 KB
/
.gitignore
File metadata and controls
57 lines (46 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# posible_wins = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [7, 4, 1], [8, 5, 2], [9, 6, 3], [3, 2, 1], [6, 5, 4], [9, 8, 7], [1, 4, 7], [2, 5, 8], [3, 6, 9], [7, 5, 3], [3, 5, 7], [9, 5, 1], [1, 5, 9]]
# board = [%w[1,2,3], %w[4,5,6], %w[7,8,9]]
# player_one_choices = []
# player_two_choices = []
# move_is_valid = [1,2,3,4,5,6,7,8,9]
# game_on = true
# puts "Hello people! Today we will play Tic_tac_toe game!"
# puts "It's going to be 1vs1 in 9 field board, like this:"
# puts board
# puts "So who's going to play? Player one tell us your name:"
# puts 'Player 1 name: '
# player_one = gets.chomp
# puts 'Now Player 2 what is your name '
# player_two = gets.chomp
# puts "Ok #{player_one} and #{player_two} nice to meet you! Let's start the game!"
# puts board
# puts "#{player_one} choose a number from the board:"
# player_one_choice = gets.chomp.to_i
# if player_one_choice === move_is_valid.any?(Integer)
# player_one_choices << player_one_choice
# puts board
# else
# puts "Hei that's not a number 1 to 9!"
# end
# class Board
# {1 =>"X", "age"=>5}
# end
# puts "Enter name: >> "
# name = gets.chomp
# puts "Enter a value between 1 & 9: >> "
# val = Integer(gets.chomp)
# def draw_board
# positions = [1, 2, 3, 4, 5, 6, 7, 8, 9]
# "
# #{positions[0]} | #{positions[1]} | #{positions[2]}
# =========
# #{positions[3]} | #{positions[4]} | #{positions[5]}
# =========
# #{positions[6]} | #{positions[7]} | #{positions[8]}
# "
# end
# def valid_move?(val)
# end
# def update_board(val , mark)
# end
# puts draw_board