ticktacktoe 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ticktacktoe.rb +11 -14
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2c94840de2279d9bc054031b351d36c57c06d014
4
- data.tar.gz: daaf690749938ea2fbe2112cb140e0a312fa8a1e
3
+ metadata.gz: b81b0ed0cf0998f09188f1eeee261f73da90dc00
4
+ data.tar.gz: 02bdfbd9d9e144ecdf6770eed66a6aa93c5e1395
5
5
  SHA512:
6
- metadata.gz: 9eab8e57dfa3f2a3c4ce8fc2a938fe0cb34248fc598f18db170049adce44b526dafbf31211a5ca067540c9d6719e1ed8c6303540ba6eec3ccc9446b4ade1de9b
7
- data.tar.gz: 7795efd3cf82499ceae45e283c51c7964d6a2a530d77a72613e6d5459afcd38177fc49c5cffd2aa960999e3a0ac2ffe22b1be2f1f5ec62f7b58607f86f28f355
6
+ metadata.gz: ee442833eacc2ebd38aec2c544476938e1f1d290f2da3f7ac0cf3377bbfec426d706e0bce72a210742f527ca83890e3e83d4eafa4136759b39ddb46c5be3510f
7
+ data.tar.gz: 28da28de2b5c455d81aca6ca9527375851bdc9e728f80288f80357f2023aaea70a7caf806e9c85d77271cf2771fcbc69ede0d6623fa8f2ee32ce762356069a04
data/lib/ticktacktoe.rb CHANGED
@@ -1,5 +1,15 @@
1
1
  class Ticktacktoe
2
- def tablero(tamaño)
2
+ def tablero
3
+ tamaño = ""
4
+ while tamaño.to_i < 3
5
+ puts "Tamaño del tablero"
6
+ tamaño = gets.chomp
7
+ if tamaño.to_i < 3
8
+ puts "Tamaño no valido"
9
+ gets.chomp
10
+ system("cls")
11
+ end
12
+ end
3
13
  tab = Array.new(tamaño){Array.new(tamaño)}
4
14
  for i in 0...tamaño
5
15
  for j in 0...tamaño
@@ -157,16 +167,3 @@ class Ticktacktoe
157
167
  return " "
158
168
  end
159
169
  end
160
-
161
- tamaño = ""
162
- while tamaño.to_i < 3
163
- puts "Tamaño del tablero"
164
- tamaño = gets.chomp
165
- if tamaño.to_i < 3
166
- puts "Tamaño no valido"
167
- gets.chomp
168
- system("cls")
169
- end
170
- end
171
- juego = Ticktacktoe.new
172
- tablero = juego.tablero(tamaño.to_i)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ticktacktoe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luis Daniel Parga Cruz