connect4 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a218f072e99fdd759f43832e5d8ec5401fc38086a0441a90668967c9f52111c9
4
- data.tar.gz: a6c61b07ff25e3b6df6a1f2d78f7ee62a235b86ae2b20d3d44b8eece8a8fd3ba
3
+ metadata.gz: 25faf63f6455c74af1991293ad5486c036622c0bbadc2f997900ca70e05c0aa7
4
+ data.tar.gz: 3974c292bc99a90b84173d579e5ceff5274c6a42abda2bc07ee27a94a999bb0a
5
5
  SHA512:
6
- metadata.gz: 0c63e79c8e93b332b66726beb6b5c2dc644796146694c56b1180d95017d798517b23f6857e694347d01c029ad1c9d8ee2308ff355a1bbaba2c399cd6a1ced017
7
- data.tar.gz: f97b7d4c2203664e843f4a7ff012c21532e538d92419ea86e648753d2cb05a1e166a2acf710345da14f6fc2486077b73f0315e4e6355926a88f846f401fb4fd9
6
+ metadata.gz: 4aa90822b99138dab93068a308f704ca47a1c651c26ada20c15930dd88540e1c27808c0b4d34eecb85fddf27c6d74e0fb35aa3447538628004c09a1f31d4eb34
7
+ data.tar.gz: a528e714434c48ff5f0e1f89b1c95a281ba694b4d551c90603d4fd60aa9653e5606720bfed32e2ee2bf5379d3b656f13b660e2015ac1ccc90d72822b5dfd0fdb
data/README.md CHANGED
@@ -4,10 +4,9 @@ This gem will allow you to play connect four in your terminal.
4
4
 
5
5
  ## Installation
6
6
 
7
- To install the gem, clone this repo, then, while in a terminal with the repo, enter:
7
+ To install this gem, enter the following into your terminal
8
8
 
9
- $bundle exec rake install
10
-
9
+ $ gem install connect4
11
10
 
12
11
  To play, type connect4 into your terminal.
13
12
 
Binary file
data/connect4.gemspec ADDED
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/connect4/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "connect4"
7
+ spec.version = Connect4::VERSION
8
+ spec.authors = ["Weston Sandfort", "Brian Hayes"]
9
+ spec.email = ["sandfortw@gmail.com"]
10
+
11
+ spec.summary = "This gem allows you to play Connect Four with a dumb computer or another player"
12
+ spec.homepage = "https://github.com/sandfortw/connect_four0"
13
+ spec.license = "MIT"
14
+ spec.required_ruby_version = ">= 2.6.0"
15
+
16
+
17
+ spec.metadata["homepage_uri"] = spec.homepage
18
+ spec.metadata["source_code_uri"] = "https://github.com/sandfortw/connect_four0"
19
+
20
+ # Specify which files should be added to the gem when it is released.
21
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
22
+ spec.files = Dir.chdir(__dir__) do
23
+ `git ls-files -z`.split("\x0").reject do |f|
24
+ (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
25
+ end
26
+ end
27
+ spec.bindir = "exe"
28
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
29
+ spec.require_paths = ["lib"]
30
+
31
+ # Uncomment to register a new dependency of your gem
32
+ # spec.add_dependency "example-gem", "~> 1.0"
33
+
34
+ # For more information and examples about making a new gem, check out our
35
+ # guide at: https://bundler.io/guides/creating_gem.html
36
+ end
data/lib/board.rb CHANGED
@@ -105,7 +105,8 @@ class Board
105
105
  @matrix.column(2).to_a.map { |cell| cell.render }.join.scan(/XXXX/) == ['XXXX'] ||
106
106
  @matrix.column(3).to_a.map { |cell| cell.render }.join.scan(/XXXX/) == ['XXXX'] ||
107
107
  @matrix.column(4).to_a.map { |cell| cell.render }.join.scan(/XXXX/) == ['XXXX'] ||
108
- @matrix.column(5).to_a.map { |cell| cell.render }.join.scan(/XXXX/) == ['XXXX']
108
+ @matrix.column(5).to_a.map { |cell| cell.render }.join.scan(/XXXX/) == ['XXXX'] ||
109
+ @matrix.column(6).to_a.map { |cell| cell.render }.join.scan(/XXXX/) == ['XXXX']
109
110
  return true
110
111
  end
111
112
 
@@ -131,7 +132,8 @@ class Board
131
132
  @matrix.column(2).to_a.map { |cell| cell.render }.join.scan(/OOOO/) == ['OOOO'] ||
132
133
  @matrix.column(3).to_a.map { |cell| cell.render }.join.scan(/OOOO/) == ['OOOO'] ||
133
134
  @matrix.column(4).to_a.map { |cell| cell.render }.join.scan(/OOOO/) == ['OOOO'] ||
134
- @matrix.column(5).to_a.map { |cell| cell.render }.join.scan(/OOOO/) == ['OOOO']
135
+ @matrix.column(5).to_a.map { |cell| cell.render }.join.scan(/OOOO/) == ['OOOO'] ||
136
+ @matrix.column(6).to_a.map { |cell| cell.render }.join.scan(/OOOO/) == ['OOOO']
135
137
  return true
136
138
  end
137
139
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Connect4
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: connect4
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
  - Weston Sandfort
@@ -26,6 +26,8 @@ files:
26
26
  - LICENSE.txt
27
27
  - README.md
28
28
  - Rakefile
29
+ - connect4-0.1.0.gem
30
+ - connect4.gemspec
29
31
  - exe/connect4
30
32
  - lib/board.rb
31
33
  - lib/cell.rb