connect_four_cli 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 8441f348fb665e42fa3ad931fc5c9922a82a8f4b
4
+ data.tar.gz: fbd4146e8760cd39e2cc79efe0c45d51aa77aef6
5
+ SHA512:
6
+ metadata.gz: 2e3ea921ed61e4b4465d7b3955b2e0835007f7cad7c2d0152e4a11bc767d17d8b84595df274e90e25c35afd80844c93805f4c08141d3bf047acf4709792b8977
7
+ data.tar.gz: 00097d0c31985402dcb8611832d901849d81be5a3051e46ee1a0a9d75c8209dd3cb203410d82cf2406316ef186cb411098b258ca41499363bb6d8a50eca2be2b
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2.1
4
+ before_install: gem install bundler -v 1.10.5
@@ -0,0 +1,13 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
+
5
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
6
+
7
+ Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8
+
9
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10
+
11
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
+
13
+ This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in connect_four_cli.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Kit Langton
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # ConnectFourCli
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/connect_four_cli`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'connect_four_cli'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install connect_four_cli
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/connect_four_cli. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
36
+
37
+
38
+ ## License
39
+
40
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
+
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "connect_four_cli"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,37 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'connect_four_cli/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "connect_four_cli"
8
+ spec.version = ConnectFourCli::VERSION
9
+ spec.authors = ["Kit Langton"]
10
+ spec.email = ["kitlangton@gmail.com"]
11
+
12
+ spec.summary = %q{A command line Connect Four game.}
13
+ spec.description = %q{A command line Connect Four game.}
14
+ spec.homepage = "https://github.com/kitlangton/connect_four_cli"
15
+ spec.license = "MIT"
16
+
17
+ # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
18
+ # delete this section to allow pushing this gem to any host.
19
+ if spec.respond_to?(:metadata)
20
+ spec.metadata['allowed_push_host'] = "https://rubygems.org"
21
+ else
22
+ raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
23
+ end
24
+
25
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
+ spec.bindir = "exe"
27
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
+ spec.require_paths = ["lib"]
29
+
30
+ spec.add_development_dependency "bundler", "~> 1.10"
31
+ spec.add_development_dependency "rake", "~> 10.0"
32
+ spec.add_development_dependency "rspec"
33
+
34
+ spec.add_dependency 'highline'
35
+ spec.add_dependency 'rainbow'
36
+ spec.add_dependency 'dispel'
37
+ end
@@ -0,0 +1,3 @@
1
+ require 'connect_four_cli'
2
+
3
+ ConnectFourCli.start
@@ -0,0 +1,163 @@
1
+ module ConnectFourCli
2
+ class Board
3
+ attr_reader :size, :grid, :turn, :winner
4
+
5
+ def initialize(size)
6
+ @size = size
7
+ @turn = :red
8
+ build_grid
9
+ end
10
+
11
+ def build_grid
12
+ @grid = Array.new(size) { Array.new(size) { NoChecker.new } }
13
+ end
14
+
15
+ def next_turn
16
+ if @winner
17
+ @turn = @winner
18
+ else
19
+ @turn = (@turn == :red ? :yellow : :red)
20
+ end
21
+ end
22
+
23
+ def place_turn_checker(position)
24
+ return if column_full?(position)
25
+ checker = Checker.new(@turn)
26
+ place_checker(checker, at: position)
27
+ next_turn
28
+ end
29
+
30
+ def place_checker(checker, at:)
31
+ row = free_position(at)
32
+ grid[row][at] = checker
33
+ end
34
+
35
+ def column_full?(number)
36
+ column_count(number) == 6
37
+ end
38
+
39
+ def column_count(number)
40
+ column(number).count(&:checker?)
41
+ end
42
+
43
+ def free_position(number)
44
+ size - column_count(number) - 1
45
+ end
46
+
47
+ def red_locations
48
+ output = []
49
+ grid.transpose.each_with_index do |row, y|
50
+ row.each_with_index do |checker, x|
51
+ if checker.color == :red
52
+ output << [x,y]
53
+ end
54
+ end
55
+ end
56
+ output
57
+ end
58
+
59
+ def yellow_locations
60
+ output = []
61
+ grid.transpose.each_with_index do |row, y|
62
+ row.each_with_index do |checker, x|
63
+ if checker.color == :yellow
64
+ output << [x,y]
65
+ end
66
+ end
67
+ end
68
+ output
69
+ end
70
+
71
+
72
+ def column(number)
73
+ grid.transpose[number]
74
+ end
75
+
76
+ def display
77
+ output = []
78
+ grid.transpose.each do |column|
79
+ line = []
80
+ column.each do |checker|
81
+ line << checker.display
82
+ end
83
+ output << line
84
+ end
85
+ output.transpose.map{ |row| row.join(" ")}.join("\n") +
86
+ "\n " + game_state
87
+ end
88
+
89
+ def red_four_in_a_row?
90
+ return true if each_row(:red)
91
+ return true if each_col(:red)
92
+ return true if each_diag(:red)
93
+ end
94
+
95
+ def yellow_four_in_a_row?
96
+ return true if each_row(:yellow)
97
+ return true if each_col(:yellow)
98
+ return true if each_diag(:yellow)
99
+ end
100
+
101
+ def each_col(color)
102
+ grid.transpose.each do |row|
103
+ row.each_cons(4) do |checkers|
104
+ return true if checkers.all? { |c| c.color == color}
105
+ end
106
+ end
107
+ false
108
+ end
109
+
110
+ def each_diag(color)
111
+ diagonals.each do |diagonal|
112
+ return true if diagonal.all? do |x, y|
113
+ grid[x][y].color == color
114
+ end
115
+ return true if diagonal.all? do |x, y|
116
+ grid[y][5-x].color == color
117
+ end
118
+ end
119
+ false
120
+ end
121
+
122
+ def diagonals
123
+ output = []
124
+ output << [[0,0],[1,1],[2,2],[3,3]]
125
+ output << [[1,1],[2,2],[3,3],[4,4]]
126
+ output << [[2,2],[3,3],[4,4],[5,5]]
127
+
128
+ output << [[0,1],[1,2],[2,3],[3,4]]
129
+ output << [[0,2],[1,3],[2,4],[3,5]]
130
+
131
+ output << [[1,0],[2,1],[3,2],[4,3]]
132
+ output << [[2,0],[3,1],[4,2],[5,3]]
133
+
134
+ output << [[1,2],[2,3],[3,4],[4,5]]
135
+ output << [[2,1],[3,2],[4,3],[5,4]]
136
+ output
137
+ end
138
+
139
+ def each_row(color)
140
+ grid.each do |row|
141
+ row.each_cons(4) do |checkers|
142
+ return true if checkers.all? { |c| c.color == color}
143
+ end
144
+ end
145
+ false
146
+ end
147
+
148
+ def game_state
149
+ "\n"
150
+ if yellow_four_in_a_row?
151
+ @winner = :yellow
152
+ @turn = :yellow
153
+ "Yellow wins! Press q to quit."
154
+ elsif red_four_in_a_row?
155
+ @winner = :red
156
+ @turn = :red
157
+ "Red wins! Press q to quit."
158
+ else
159
+ "#{@turn.capitalize}'s turn."
160
+ end
161
+ end
162
+ end
163
+ end
@@ -0,0 +1,38 @@
1
+ require 'rainbow'
2
+
3
+ module ConnectFourCli
4
+ class Checker
5
+
6
+ attr_reader :color
7
+
8
+ def initialize(color)
9
+ @color = color
10
+ end
11
+
12
+ def ==(other_checker)
13
+ color == other_checker.color
14
+ end
15
+
16
+ def display
17
+ "O"
18
+ end
19
+
20
+ def checker?
21
+ true
22
+ end
23
+ end
24
+
25
+ class NoChecker < Checker
26
+ def initialize
27
+ super(:none)
28
+ end
29
+
30
+ def display
31
+ "0"
32
+ end
33
+
34
+ def checker?
35
+ false
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,70 @@
1
+ require 'dispel'
2
+
3
+ module ConnectFourCli
4
+ class Renderer
5
+ def self.turn_color(turn)
6
+ if turn == :red
7
+ ["#ff0000", "#000000"].reverse
8
+ else
9
+ ["#ffff00", "#000000"].reverse
10
+ end
11
+ end
12
+
13
+ def self.highlight_column(board, column)
14
+ map = Dispel::StyleMap.new(6) # number of lines
15
+ (0..5).each do |row|
16
+ map.add(turn_color(board.turn), row, column..column)
17
+ end
18
+ board.red_locations.each do |location|
19
+ map.add(["#ff0000", "#000000"], location[0], location[1]*2..location[1]*2 + 1)
20
+ end
21
+ board.yellow_locations.each do |location|
22
+ map.add(["#ffff00", "#000000"], location[0], location[1]*2..location[1]*2 + 1)
23
+ end
24
+ map.add(turn_color(board.turn), 0, column..column)
25
+ map
26
+ end
27
+
28
+ def self.start
29
+ ::Dispel::Screen.open(colors: true) do |screen|
30
+ Curses.curs_set 0
31
+
32
+ board = Board.new(6)
33
+ content = board.display
34
+
35
+ x = 0
36
+ y = 0
37
+
38
+ map = self.highlight_column(board, x)
39
+ screen.draw content, map, [y,x]
40
+
41
+ Dispel::Keyboard.output do |key|
42
+ if board.winner
43
+ Dispel::Keyboard.output do |key|
44
+ case key
45
+ when "q" then break
46
+ end
47
+ end
48
+ break
49
+ end
50
+
51
+ case key
52
+ when :right
53
+ next if x + 2 >= 12
54
+ x += 2
55
+ when :left
56
+ next if x - 2 < 0
57
+ x-= 2
58
+ when " "
59
+ board.place_turn_checker(x / 2)
60
+ when "q" then break
61
+
62
+ end
63
+ map = self.highlight_column(board, x)
64
+ content = board.display
65
+ screen.draw content, map, [y,x]
66
+ end
67
+ end
68
+ end
69
+ end
70
+ end
@@ -0,0 +1,3 @@
1
+ module ConnectFourCli
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,10 @@
1
+ require "connect_four_cli/version"
2
+ require "connect_four_cli/checker"
3
+ require "connect_four_cli/board"
4
+ require "connect_four_cli/renderer"
5
+
6
+ module ConnectFourCli
7
+ def self.start
8
+ Renderer.start
9
+ end
10
+ end
data/tags ADDED
@@ -0,0 +1,50 @@
1
+ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
2
+ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
3
+ !_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
4
+ !_TAG_PROGRAM_NAME Exuberant Ctags //
5
+ !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
6
+ !_TAG_PROGRAM_VERSION 5.8 //
7
+ == /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/checker.rb /^ def ==(other_checker)$/;" f class:ConnectFourCli.Checker
8
+ Board /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/board.rb /^ class Board$/;" c class:ConnectFourCli
9
+ Checker /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/checker.rb /^class Checker$/;" c class:ConnectFourCli
10
+ ConnectFourCli /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli.rb /^module ConnectFourCli$/;" m
11
+ ConnectFourCli /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/board.rb /^module ConnectFourCli$/;" m
12
+ ConnectFourCli /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/checker.rb /^module ConnectFourCli$/;" m
13
+ ConnectFourCli /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/renderer.rb /^module ConnectFourCli$/;" m
14
+ ConnectFourCli /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/version.rb /^module ConnectFourCli$/;" m
15
+ NoChecker /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/checker.rb /^class NoChecker < Checker$/;" c class:ConnectFourCli
16
+ Renderer /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/renderer.rb /^ class Renderer$/;" c class:ConnectFourCli
17
+ build_board /Users/kitlangton/Viking/Unit4/connect_four_cli/spec/connect_four_cli/board_spec.rb /^ def build_board$/;" f
18
+ build_grid /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/board.rb /^ def build_grid$/;" f class:ConnectFourCli.Board
19
+ checker? /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/checker.rb /^ def checker?$/;" f class:ConnectFourCli.Checker
20
+ checker? /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/checker.rb /^ def checker?$/;" f class:ConnectFourCli.NoChecker
21
+ column /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/board.rb /^ def column(number)$/;" f class:ConnectFourCli.Board
22
+ column_count /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/board.rb /^ def column_count(number)$/;" f class:ConnectFourCli.Board
23
+ column_full? /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/board.rb /^ def column_full?(number)$/;" f class:ConnectFourCli.Board
24
+ diagonals /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/board.rb /^ def diagonals$/;" f class:ConnectFourCli.Board
25
+ display /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/board.rb /^ def display$/;" f class:ConnectFourCli.Board
26
+ display /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/checker.rb /^ def display$/;" f class:ConnectFourCli.Checker
27
+ display /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/checker.rb /^ def display$/;" f class:ConnectFourCli.NoChecker
28
+ each_col /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/board.rb /^ def each_col(color)$/;" f class:ConnectFourCli.Board
29
+ each_diag /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/board.rb /^ def each_diag(color)$/;" f class:ConnectFourCli.Board
30
+ each_row /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/board.rb /^ def each_row(color)$/;" f class:ConnectFourCli.Board
31
+ free_position /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/board.rb /^ def free_position(number)$/;" f class:ConnectFourCli.Board
32
+ game_state /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/board.rb /^ def game_state$/;" f class:ConnectFourCli.Board
33
+ highlight_column /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/renderer.rb /^ def self.highlight_column(board, column)$/;" F class:ConnectFourCli.Renderer
34
+ initialize /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/board.rb /^ def initialize(size)$/;" f class:ConnectFourCli.Board
35
+ initialize /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/checker.rb /^ def initialize$/;" f class:ConnectFourCli.NoChecker
36
+ initialize /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/checker.rb /^ def initialize(color)$/;" f class:ConnectFourCli.Checker
37
+ next_turn /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/board.rb /^ def next_turn$/;" f class:ConnectFourCli.Board
38
+ place_checker /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/board.rb /^ def place_checker(checker, at:)$/;" f class:ConnectFourCli.Board
39
+ place_turn_checker /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/board.rb /^ def place_turn_checker(position)$/;" f class:ConnectFourCli.Board
40
+ red_checker /Users/kitlangton/Viking/Unit4/connect_four_cli/spec/connect_four_cli/board_spec.rb /^ def red_checker$/;" f
41
+ red_checker /Users/kitlangton/Viking/Unit4/connect_four_cli/spec/connect_four_cli/checker_spec.rb /^ def red_checker$/;" f
42
+ red_four_in_a_row? /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/board.rb /^ def red_four_in_a_row?$/;" f class:ConnectFourCli.Board
43
+ red_locations /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/board.rb /^ def red_locations$/;" f class:ConnectFourCli.Board
44
+ start /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli.rb /^ def self.start$/;" F class:ConnectFourCli
45
+ start /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/renderer.rb /^ def self.start$/;" F class:ConnectFourCli.Renderer
46
+ turn_color /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/renderer.rb /^ def self.turn_color(turn)$/;" F class:ConnectFourCli.Renderer
47
+ yellow_checker /Users/kitlangton/Viking/Unit4/connect_four_cli/spec/connect_four_cli/board_spec.rb /^ def yellow_checker$/;" f
48
+ yellow_checker /Users/kitlangton/Viking/Unit4/connect_four_cli/spec/connect_four_cli/checker_spec.rb /^ def yellow_checker$/;" f
49
+ yellow_four_in_a_row? /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/board.rb /^ def yellow_four_in_a_row?$/;" f class:ConnectFourCli.Board
50
+ yellow_locations /Users/kitlangton/Viking/Unit4/connect_four_cli/lib/connect_four_cli/board.rb /^ def yellow_locations$/;" f class:ConnectFourCli.Board
metadata ADDED
@@ -0,0 +1,148 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: connect_four_cli
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Kit Langton
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2016-01-06 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.10'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.10'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: highline
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rainbow
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: dispel
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ description: A command line Connect Four game.
98
+ email:
99
+ - kitlangton@gmail.com
100
+ executables:
101
+ - connect_four_cli
102
+ extensions: []
103
+ extra_rdoc_files: []
104
+ files:
105
+ - ".gitignore"
106
+ - ".rspec"
107
+ - ".travis.yml"
108
+ - CODE_OF_CONDUCT.md
109
+ - Gemfile
110
+ - LICENSE.txt
111
+ - README.md
112
+ - Rakefile
113
+ - bin/console
114
+ - bin/setup
115
+ - connect_four_cli.gemspec
116
+ - exe/connect_four_cli
117
+ - lib/connect_four_cli.rb
118
+ - lib/connect_four_cli/board.rb
119
+ - lib/connect_four_cli/checker.rb
120
+ - lib/connect_four_cli/renderer.rb
121
+ - lib/connect_four_cli/version.rb
122
+ - tags
123
+ homepage: https://github.com/kitlangton/connect_four_cli
124
+ licenses:
125
+ - MIT
126
+ metadata:
127
+ allowed_push_host: https://rubygems.org
128
+ post_install_message:
129
+ rdoc_options: []
130
+ require_paths:
131
+ - lib
132
+ required_ruby_version: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - ">="
135
+ - !ruby/object:Gem::Version
136
+ version: '0'
137
+ required_rubygems_version: !ruby/object:Gem::Requirement
138
+ requirements:
139
+ - - ">="
140
+ - !ruby/object:Gem::Version
141
+ version: '0'
142
+ requirements: []
143
+ rubyforge_project:
144
+ rubygems_version: 2.4.6
145
+ signing_key:
146
+ specification_version: 4
147
+ summary: A command line Connect Four game.
148
+ test_files: []