eugame 0.0.1 → 0.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9354c877e5c90ca981489601a01f013a6d0d6c42de1f4cfac664fb18a67b4108
4
- data.tar.gz: 86314bd5a48864e3354b451a6179722e3a339c492a53f8aa7001eeb405101f26
3
+ metadata.gz: e9ce85e5be87f64d1f1807254e920a2d605d29e4d0406fd671e449bc1cbd41f4
4
+ data.tar.gz: a66e796e42ffa58b5eb4abde5f32bd65a4ede35d48b93393fdd5cdfed050c58e
5
5
  SHA512:
6
- metadata.gz: 81ea18f2f8521697e9471504921d086296b7ce33ffc84fcf99546a9a3b5d1a440fdc57a852ab67b8112cf0689021351b40eab49ac52572a8a521a961f2891475
7
- data.tar.gz: 2152964ad5ea7f9f805fab860a1e2c913843405cce36c76d878d8bf20cfacaea5e575f77f312d2ed5d417c48cc5ca66852ea1a94464e06bfaf761a9c384b9055
6
+ metadata.gz: a7c6e5f6cec670d2e80e601e339d8ea20821bddf2b568a0da30762ce1275d017caaddbb0322afd51c446952915732b14353bddb9f6e0f9f4bd79b6eb2db6c623
7
+ data.tar.gz: 9debb99ec22c9707a6525a975d6edbc61c725ed0a1e580bc360579da342a38569fdabd6f9d97f5aa37da2a725081af592e12c5be0cf2cf01b84f1a8bbc51e23c
@@ -1,7 +1,12 @@
1
1
  require 'gamelib/gamelib.rb'
2
+
3
+ # tic tac toe
2
4
  require 'gamelib/ttt/ttt.rb'
3
5
  require 'gamelib/ttt/colorize.rb'
4
6
 
7
+ # manstermind
8
+ #require 'gamelib/mastermind/mastermind.rb'
9
+
5
10
  module EUGAME
6
11
  class EuGame
7
12
  def start
@@ -18,10 +18,16 @@ class TicTacToe
18
18
  end
19
19
 
20
20
  def play
21
- while true do
21
+ for i in 0...9 do
22
22
  display_board
23
23
  turn
24
24
  return if !@playing
25
+ if i==8
26
+ system('clear')
27
+ display_board
28
+ puts "%15s" % "Draw!"
29
+ break
30
+ end
25
31
  system('clear')
26
32
  end
27
33
  end
@@ -83,5 +89,7 @@ class TicTacToe
83
89
  puts "%15s" % "#{@@players[@@p_turn.to_sym][:name]} won"
84
90
  @playing = false;
85
91
  end
92
+
93
+ # draw
86
94
  end
87
95
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eugame
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jione Eu