connect_four_2301 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
+ SHA256:
3
+ metadata.gz: a9773a767de66c3b76bee7bea6e39862ab2ab99b42f2e15db2616c2d46525652
4
+ data.tar.gz: a77e8bdbaa6ffb4aa8fb136bb910f0f0d650ff90a58ef9e637155b2d1a43fbdf
5
+ SHA512:
6
+ metadata.gz: e6dd6940b97e52561eac37bbd71782e83c91ec3b1c80e4d50a05fe69b0a5d407a7d83c5b5ade1a105dd233181433155cce671851753f00422a2e740d7e157a48
7
+ data.tar.gz: d41178b66342d0ed3f7f1009ede23c5dde181cdfb2063c8358b6a7d3c16f6bb71f1af8a2d29e05406972536e9a76f0e0cda63e7b1a51765429b77f350494ef03
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in connect_four_2301.gemspec
6
+ gemspec
7
+
8
+ gem 'simplecov', require: false, group: :test
9
+
10
+ gem "rake", "~> 13.0"
11
+
12
+ gem "rspec", "~> 3.0"
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 Branden Ge
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,35 @@
1
+ # ConnectFour2301
2
+
3
+ TODO: Delete this and the text below, and describe your gem
4
+
5
+ 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_2301`. To experiment with that code, run `bin/console` for an interactive prompt.
6
+
7
+ ## Installation
8
+
9
+ TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
+
11
+ Install the gem and add to the application's Gemfile by executing:
12
+
13
+ $ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
14
+
15
+ If bundler is not being used to manage dependencies, install the gem by executing:
16
+
17
+ $ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Development
24
+
25
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
26
+
27
+ 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 the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
28
+
29
+ ## Contributing
30
+
31
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/connect_four_2301.
32
+
33
+ ## License
34
+
35
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task default: :spec
data/c4_runner.rb ADDED
@@ -0,0 +1,4 @@
1
+ require './lib/connect_four_2301/game'
2
+
3
+ game = Game.new
4
+ game.start
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/connect_four_2301/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "connect_four_2301"
7
+ spec.version = ConnectFour2301::VERSION
8
+ spec.authors = ["Branden Ge", "Alec Kapicak"]
9
+ spec.email = ["86636108+brandenge@users.noreply.github.com"]
10
+
11
+ spec.summary = "Connect Four game playable from the command line"
12
+ spec.description = "This project is a recreation of the popular Connect Four game. It is playable from the command line and features color ASCII art"
13
+ spec.homepage = "https://github.com/brandenge/connect_four"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = ">= 2.6.0"
16
+
17
+ spec.metadata["homepage_uri"] = spec.homepage
18
+ spec.metadata["source_code_uri"] = "https://github.com/brandenge/connect_four"
19
+ spec.metadata["changelog_uri"] = "https://github.com/brandenge/connect_four"
20
+
21
+ # Specify which files should be added to the gem when it is released.
22
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
+ spec.files = Dir.chdir(__dir__) do
24
+ `git ls-files -z`.split("\x0").reject do |f|
25
+ (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|circleci)|appveyor)})
26
+ end
27
+ end
28
+ spec.bindir = "exe"
29
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
30
+ spec.require_paths = ["lib"]
31
+
32
+ # Uncomment to register a new dependency of your gem
33
+ # spec.add_dependency "example-gem", "~> 1.0"
34
+
35
+ # For more information and examples about making a new gem, check out our
36
+ # guide at: https://bundler.io/guides/creating_gem.html
37
+ end
@@ -0,0 +1,247 @@
1
+ require './lib/connect_four_2301/messages'
2
+
3
+ class Board
4
+ include Messages
5
+
6
+ attr_reader :slots
7
+
8
+ def initialize
9
+ @slots = initialize_board
10
+ @turns = []
11
+ @columns = [*('A'..'G')]
12
+ end
13
+
14
+ def initialize_board
15
+ @slots = [*(1..6)].map do |row|
16
+ [*(1..7)].map { |col| :white }
17
+ end
18
+ end
19
+
20
+ def render
21
+ blocks = {
22
+ line: "#{' ' * 72}",
23
+ border: "#{' ' * 2}",
24
+ blue: "#{' ' * 8}",
25
+ white: "#{' ' * 8}",
26
+ red: "#{' ' * 8}"
27
+ }
28
+ padding = ' '
29
+ puts "\n\n"
30
+ render_col_text
31
+ @slots.each do |row|
32
+ puts padding + blocks[:line]
33
+ row = row.map do |slot|
34
+ case slot
35
+ when :white then blocks[:white]
36
+ when :blue then blocks[:blue]
37
+ when :red then blocks[:red]
38
+ end
39
+ end
40
+ row = padding + blocks[:border] + row.join(blocks[:border]) + blocks[:border]
41
+ puts "#{row}\n#{row}\n#{row}\n#{row}\n"
42
+ end
43
+ puts padding + blocks[:line]
44
+ puts "\n\n"
45
+ end
46
+
47
+ def render_col_text
48
+ puts COLUMN_TEXT
49
+ end
50
+
51
+ def next_turn(name, color, player_is_human)
52
+ if player_is_human
53
+ move = player_move(name, valid_columns)
54
+ row = find_lowest_row(move)
55
+ col = @columns.index(move)
56
+ else
57
+ row, col = computer_move(valid_columns)
58
+ end
59
+ @turns << Turn.new(row, col, color)
60
+ nil
61
+ end
62
+
63
+ def player_move(name, valid_columns)
64
+ puts "#{name}, please select a letter from the following columns: #{valid_columns.join(", ")}."
65
+ player_selection = gets.chomp.upcase
66
+ until valid_columns.include?(player_selection)
67
+ puts "Sorry, that is not a valid selection. Please choose from one of the following: #{valid_columns.join(", ")}."
68
+ player_selection = gets.chomp.upcase
69
+ end
70
+ player_selection
71
+ end
72
+
73
+ def computer_move(valid_columns)
74
+ move = check_for_win(:red)
75
+ return move if move
76
+ move = check_for_win(:blue)
77
+ return move if move
78
+ find_lowest_slots(valid_columns).sample
79
+ end
80
+
81
+ def check_for_win(color)
82
+ lowest_slots = find_lowest_slots(valid_columns)
83
+ move = nil
84
+ lowest_slots.each do |(row, col)|
85
+ if winner({row: row, col: col, color: color})
86
+ move = [row, col]
87
+ break
88
+ end
89
+ end
90
+ move
91
+ end
92
+
93
+ def update
94
+ initialize_board
95
+ @turns.each { |turn| @slots[turn.row][turn.col] = turn.color }
96
+ nil
97
+ end
98
+
99
+ def find_lowest_row(column)
100
+ slot_index = @columns.index(column)
101
+ row_index = @slots.length - 1
102
+ @slots.each_with_index do |row, index|
103
+ if row[slot_index] == :white
104
+ row_index = index
105
+ else
106
+ break
107
+ end
108
+ end
109
+ row_index
110
+ end
111
+
112
+ def find_lowest_slots(valid_columns)
113
+ valid_columns.map do |column|
114
+ [find_lowest_row(column), @columns.index(column)]
115
+ end
116
+ end
117
+
118
+ def valid_columns
119
+ columns = [@columns, @slots[0]]
120
+ checks = columns.transpose
121
+ available_columns = checks.filter { |(column, color)| color == :white }
122
+ available_columns.map { |(column)| column }
123
+ end
124
+
125
+ def winner(row: @turns.last&.row,
126
+ col: @turns.last&.col,
127
+ color: @turns.last&.color,
128
+ direction: nil,
129
+ count: 1)
130
+
131
+ return nil if @turns.empty?
132
+ if count == 4
133
+ return color
134
+ elsif row < 0 || col < 0 || @slots[row]&.[](col) == nil
135
+ return nil
136
+ end
137
+
138
+ result = nil
139
+ adj_directions = [:top_right, :right, :bottom_right, :bottom, :bottom_left, :left, :top_left]
140
+
141
+ direction == nil && adj_directions.each do |adj_direction|
142
+ adj_slot = adjacent_slot(row, col, adj_direction)
143
+ result = first_adjacent_match(row, col, color, adj_direction, count)
144
+ break if result
145
+ end
146
+ return result if result
147
+ another_adjacent_match(row, col, color, direction, count)
148
+ end
149
+
150
+ def adjacent_slot(row, col, direction)
151
+ up = row - 1
152
+ right = col + 1
153
+ down = row + 1
154
+ left = col - 1
155
+ slots = {
156
+ top_right: {
157
+ row: up,
158
+ col: right,
159
+ color: @slots[up]&.[](right),
160
+ opposite: :bottom_left
161
+ },
162
+ right: {
163
+ row: row,
164
+ col: right,
165
+ color: @slots[row]&.[](right),
166
+ opposite: :left
167
+ },
168
+ bottom_right: {
169
+ row: down,
170
+ col: right,
171
+ color: @slots[down]&.[](right),
172
+ opposite: :top_left
173
+ },
174
+ bottom: {
175
+ row: down,
176
+ col: col,
177
+ color: @slots[down]&.[](col),
178
+ opposite: nil
179
+ },
180
+ bottom_left: {
181
+ row: down,
182
+ col: left,
183
+ color: @slots[down]&.[](left),
184
+ opposite: :top_right
185
+ },
186
+ left: {
187
+ row: row,
188
+ col: left,
189
+ color: @slots[row]&.[](left),
190
+ opposite: :right
191
+ },
192
+ top_left: {
193
+ row: up,
194
+ col: left,
195
+ color: @slots[up]&.[](left),
196
+ opposite: :bottom_right
197
+ }
198
+ }
199
+ slots[direction]
200
+ end
201
+
202
+ def first_adjacent_match(row, col, color, adj_direction, count)
203
+ adj_slot = adjacent_slot(row, col, adj_direction)
204
+ arguments = {
205
+ row: adj_slot[:row],
206
+ col: adj_slot[:col],
207
+ color: color,
208
+ direction: adj_direction,
209
+ count: count + 2
210
+ }
211
+ if adj_slot[:color] == color &&
212
+ adjacent_slot(row, col, adj_slot[:opposite])&.[](:color) == color
213
+ return winner(arguments)
214
+ arguments[:direction] = adj_slot[:opposite]
215
+ return opposite_adjacent_match(row, col, color, adj_direction, count)
216
+ elsif adj_slot[:color] == color
217
+ arguments[:count] = count + 1
218
+ return winner(arguments)
219
+ end
220
+ end
221
+
222
+ def opposite_adjacent_match(row, col, color, adj_direction, count)
223
+ adj_slot = adjacent_slot(row, col, adj_direction)
224
+ arguments = {
225
+ row: adjacent_slot(row, col, adj_slot[:opposite])[:row],
226
+ col: adjacent_slot(row, col, adj_slot[:opposite])[:col],
227
+ color: color,
228
+ direction: adj_slot[:opposite],
229
+ count: count
230
+ }
231
+ return winner(arguments)
232
+ end
233
+
234
+ def another_adjacent_match(row, col, color, direction, count)
235
+ adj_slot = adjacent_slot(row, col, direction)
236
+ if direction != nil && adj_slot[:color] == color
237
+ arguments = {
238
+ row: adj_slot[:row],
239
+ col: adj_slot[:col],
240
+ color: color,
241
+ direction: direction,
242
+ count: count + 1
243
+ }
244
+ return winner(arguments)
245
+ end
246
+ end
247
+ end
@@ -0,0 +1,87 @@
1
+ require './lib/connect_four_2301/player'
2
+ require './lib/connect_four_2301/board'
3
+ require './lib/connect_four_2301/turn'
4
+ require './lib/connect_four_2301/title'
5
+ require './lib/connect_four_2301/messages'
6
+
7
+ class Game
8
+ include Title
9
+ include Messages
10
+
11
+ def initialize
12
+ @players = [
13
+ Player.new('Player 1', :blue),
14
+ Player.new('Player 2', :red, false)
15
+ ]
16
+ @board = Board.new
17
+ end
18
+
19
+ def start
20
+ welcome
21
+ game_menu
22
+ end
23
+
24
+ def play_game
25
+ @board.render
26
+ until game_over?
27
+ @players.each do |player|
28
+ break if game_over?
29
+ if !player.is_human?
30
+ sleep(0.5)
31
+ puts "The Computer is strategizing...\n\n"
32
+ sleep(1.5)
33
+ puts BEEP_BOOP_BOP
34
+ sleep(1)
35
+ end
36
+ @board.next_turn(player.name, player.color, player.is_human?)
37
+ @board.update
38
+ @board.render
39
+ end
40
+ end
41
+ game_over
42
+ end
43
+
44
+ def game_over?
45
+ @board.winner || @board.valid_columns.empty?
46
+ end
47
+
48
+ def welcome
49
+ puts TITLE
50
+ sleep(2)
51
+ puts WELCOME_MESSAGE
52
+ end
53
+
54
+ def game_menu
55
+ puts GAME_PLAY_PROMPT
56
+ user_input = gets.chomp
57
+ until user_input == 'p' || user_input == 'q'
58
+ puts "Please enter one of the following: p or q"
59
+ user_input = gets.chomp
60
+ end
61
+ if user_input == "p"
62
+ puts " ...\n\n"
63
+ sleep(1)
64
+ puts " Ok. You will be the Blue block. Good luck!"
65
+ sleep(3)
66
+ play_game
67
+ elsif user_input == "q"
68
+ Process.exit!
69
+ end
70
+ end
71
+
72
+ def game_over
73
+ puts " ...\n\n"
74
+ sleep(1)
75
+ puts " ...\n\n"
76
+ sleep(1)
77
+ puts " ...\n\n"
78
+ sleep(1)
79
+ if @board.valid_columns.empty?
80
+ puts DRAW_MESSAGE
81
+ elsif @players.find { |player| player.color == @board.winner }.is_human?
82
+ puts HUMAN_WIN_MESSAGE
83
+ else
84
+ puts COMPUTER_WIN_MESSAGE
85
+ end
86
+ end
87
+ end
@@ -0,0 +1,157 @@
1
+ module Messages
2
+
3
+ HUMAN_WIN_MESSAGE = <<-HUMAN_WIN
4
+
5
+ ░█████╗░░█████╗░███╗░░██╗░██████╗░██████╗░░█████╗░████████╗██╗░░░██╗██╗░░░░░░█████╗░████████╗██╗░█████╗░███╗░░██╗░██████╗
6
+ ██╔══██╗██╔══██╗████╗░██║██╔════╝░██╔══██╗██╔══██╗╚══██╔══╝██║░░░██║██║░░░░░██╔══██╗╚══██╔══╝██║██╔══██╗████╗░██║██╔════╝
7
+ ██║░░╚═╝██║░░██║██╔██╗██║██║░░██╗░██████╔╝███████║░░░██║░░░██║░░░██║██║░░░░░███████║░░░██║░░░██║██║░░██║██╔██╗██║╚█████╗░
8
+ ██║░░██╗██║░░██║██║╚████║██║░░╚██╗██╔══██╗██╔══██║░░░██║░░░██║░░░██║██║░░░░░██╔══██║░░░██║░░░██║██║░░██║██║╚████║░╚═══██╗
9
+ ╚█████╔╝╚█████╔╝██║░╚███║╚██████╔╝██║░░██║██║░░██║░░░██║░░░╚██████╔╝███████╗██║░░██║░░░██║░░░██║╚█████╔╝██║░╚███║██████╔╝
10
+ ░╚════╝░░╚════╝░╚═╝░░╚══╝░╚═════╝░╚═╝░░╚═╝╚═╝░░╚═╝░░░╚═╝░░░░╚═════╝░╚══════╝╚═╝░░╚═╝░░░╚═╝░░░╚═╝░╚════╝░╚═╝░░╚══╝╚═════╝░
11
+
12
+ ██╗░░██╗██╗░░░██╗███╗░░░███╗░█████╗░███╗░░██╗░░░    ██╗░░░██╗░█████╗░██╗░░░██╗    ░█████╗░██████╗░███████╗
13
+ ██║░░██║██║░░░██║████╗░████║██╔══██╗████╗░██║░░░    ╚██╗░██╔╝██╔══██╗██║░░░██║    ██╔══██╗██╔══██╗██╔════╝
14
+ ███████║██║░░░██║██╔████╔██║███████║██╔██╗██║░░░    ░╚████╔╝░██║░░██║██║░░░██║    ███████║██████╔╝█████╗░░
15
+ ██╔══██║██║░░░██║██║╚██╔╝██║██╔══██║██║╚████║██╗    ░░╚██╔╝░░██║░░██║██║░░░██║    ██╔══██║██╔══██╗██╔══╝░░
16
+ ██║░░██║╚██████╔╝██║░╚═╝░██║██║░░██║██║░╚███║╚█║    ░░░██║░░░╚█████╔╝╚██████╔╝    ██║░░██║██║░░██║███████╗
17
+ ╚═╝░░╚═╝░╚═════╝░╚═╝░░░░░╚═╝╚═╝░░╚═╝╚═╝░░╚══╝░╚╝    ░░░╚═╝░░░░╚════╝░░╚═════╝░    ╚═╝░░╚═╝╚═╝░░╚═╝╚══════╝
18
+
19
+ ██╗░░░██╗██╗░█████╗░████████╗░█████╗░██████╗░██╗░█████╗░██╗░░░██╗░██████╗
20
+ ██║░░░██║██║██╔══██╗╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗██║░░░██║██╔════╝
21
+ ╚██╗░██╔╝██║██║░░╚═╝░░░██║░░░██║░░██║██████╔╝██║██║░░██║██║░░░██║╚█████╗░
22
+ ░╚████╔╝░██║██║░░██╗░░░██║░░░██║░░██║██╔══██╗██║██║░░██║██║░░░██║░╚═══██╗
23
+ ░░╚██╔╝░░██║╚█████╔╝░░░██║░░░╚█████╔╝██║░░██║██║╚█████╔╝╚██████╔╝██████╔╝
24
+ ░░░╚═╝░░░╚═╝░╚════╝░░░░╚═╝░░░░╚════╝░╚═╝░░╚═╝╚═╝░╚════╝░░╚═════╝░╚═════╝░
25
+
26
+ HUMAN_WIN
27
+
28
+ COMPUTER_WIN_MESSAGE = <<-COMPUTER_WIN
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
+
58
+ COMPUTER_WIN
59
+
60
+ DRAW_MESSAGE = <<-DRAW
61
+
62
+ ░██████╗░█████╗░██████╗░██████╗░██╗░░░██╗░░░    ████████╗██╗░░██╗███████╗    ░██████╗░░█████╗░███╗░░░███╗███████╗
63
+ ██╔════╝██╔══██╗██╔══██╗██╔══██╗╚██╗░██╔╝░░░    ╚══██╔══╝██║░░██║██╔════╝    ██╔════╝░██╔══██╗████╗░████║██╔════╝
64
+ ╚█████╗░██║░░██║██████╔╝██████╔╝░╚████╔╝░░░░    ░░░██║░░░███████║█████╗░░    ██║░░██╗░███████║██╔████╔██║█████╗░░
65
+ ░╚═══██╗██║░░██║██╔══██╗██╔══██╗░░╚██╔╝░░██╗    ░░░██║░░░██╔══██║██╔══╝░░    ██║░░╚██╗██╔══██║██║╚██╔╝██║██╔══╝░░
66
+ ██████╔╝╚█████╔╝██║░░██║██║░░██║░░░██║░░░╚█║    ░░░██║░░░██║░░██║███████╗    ╚██████╔╝██║░░██║██║░╚═╝░██║███████╗
67
+ ╚═════╝░░╚════╝░╚═╝░░╚═╝╚═╝░░╚═╝░░░╚═╝░░░░╚╝    ░░░╚═╝░░░╚═╝░░╚═╝╚══════╝    ░╚═════╝░╚═╝░░╚═╝╚═╝░░░░░╚═╝╚══════╝
68
+
69
+ ██╗░░██╗░█████╗░░██████╗    ██████╗░███████╗░██████╗██╗░░░██╗██╗░░░░░████████╗███████╗██████╗░    ██╗███╗░░██╗
70
+ ██║░░██║██╔══██╗██╔════╝    ██╔══██╗██╔════╝██╔════╝██║░░░██║██║░░░░░╚══██╔══╝██╔════╝██╔══██╗    ██║████╗░██║
71
+ ███████║███████║╚█████╗░    ██████╔╝█████╗░░╚█████╗░██║░░░██║██║░░░░░░░░██║░░░█████╗░░██║░░██║    ██║██╔██╗██║
72
+ ██╔══██║██╔══██║░╚═══██╗    ██╔══██╗██╔══╝░░░╚═══██╗██║░░░██║██║░░░░░░░░██║░░░██╔══╝░░██║░░██║    ██║██║╚████║
73
+ ██║░░██║██║░░██║██████╔╝    ██║░░██║███████╗██████╔╝╚██████╔╝███████╗░░░██║░░░███████╗██████╔╝    ██║██║░╚███║
74
+ ╚═╝░░╚═╝╚═╝░░╚═╝╚═════╝░    ╚═╝░░╚═╝╚══════╝╚═════╝░░╚═════╝░╚══════╝░░░╚═╝░░░╚══════╝╚═════╝░    ╚═╝╚═╝░░╚══╝
75
+
76
+ ░█████╗░    ██████╗░██████╗░░█████╗░░██╗░░░░░░░██╗░░░    ████████╗██████╗░██╗░░░██╗
77
+ ██╔══██╗    ██╔══██╗██╔══██╗██╔══██╗░██║░░██╗░░██║░░░    ╚══██╔══╝██╔══██╗╚██╗░██╔╝
78
+ ███████║    ██║░░██║██████╔╝███████║░╚██╗████╗██╔╝░░░    ░░░██║░░░██████╔╝░╚████╔╝░
79
+ ██╔══██║    ██║░░██║██╔══██╗██╔══██║░░████╔═████║░░░░    ░░░██║░░░██╔══██╗░░╚██╔╝░░
80
+ ██║░░██║    ██████╔╝██║░░██║██║░░██║░░╚██╔╝░╚██╔╝░██╗    ░░░██║░░░██║░░██║░░░██║░░░
81
+ ╚═╝░░╚═╝    ╚═════╝░╚═╝░░╚═╝╚═╝░░╚═╝░░░╚═╝░░░╚═╝░░╚═╝    ░░░╚═╝░░░╚═╝░░╚═╝░░░╚═╝░░░
82
+
83
+ ░█████╗░░██████╗░░█████╗░██╗███╗░░██╗░░░
84
+ ██╔══██╗██╔════╝░██╔══██╗██║████╗░██║░░░
85
+ ███████║██║░░██╗░███████║██║██╔██╗██║░░░
86
+ ██╔══██║██║░░╚██╗██╔══██║██║██║╚████║░░░
87
+ ██║░░██║╚██████╔╝██║░░██║██║██║░╚███║██╗
88
+ ╚═╝░░╚═╝░╚═════╝░╚═╝░░╚═╝╚═╝╚═╝░░╚══╝╚═╝
89
+
90
+ DRAW
91
+
92
+ WELCOME_MESSAGE = <<-WELCOME
93
+
94
+ ░██╗░░░░░░░██╗███████╗██╗░░░░░░█████╗░░█████╗░███╗░░░███╗███████╗    ████████╗░█████╗░
95
+ ░██║░░██╗░░██║██╔════╝██║░░░░░██╔══██╗██╔══██╗████╗░████║██╔════╝    ╚══██╔══╝██╔══██╗
96
+ ░╚██╗████╗██╔╝█████╗░░██║░░░░░██║░░╚═╝██║░░██║██╔████╔██║█████╗░░    ░░░██║░░░██║░░██║
97
+ ░░████╔═████║░██╔══╝░░██║░░░░░██║░░██╗██║░░██║██║╚██╔╝██║██╔══╝░░    ░░░██║░░░██║░░██║
98
+ ░░╚██╔╝░╚██╔╝░███████╗███████╗╚█████╔╝╚█████╔╝██║░╚═╝░██║███████╗    ░░░██║░░░╚█████╔╝
99
+ ░░░╚═╝░░░╚═╝░░╚══════╝╚══════╝░╚════╝░░╚════╝░╚═╝░░░░░╚═╝╚══════╝    ░░░╚═╝░░░░╚════╝░
100
+
101
+ ░█████╗░░█████╗░███╗░░██╗███╗░░██╗███████╗░█████╗░████████╗    ░░██╗██╗
102
+ ██╔══██╗██╔══██╗████╗░██║████╗░██║██╔════╝██╔══██╗╚══██╔══╝    ░██╔╝██║
103
+ ██║░░╚═╝██║░░██║██╔██╗██║██╔██╗██║█████╗░░██║░░╚═╝░░░██║░░░    ██╔╝░██║
104
+ ██║░░██╗██║░░██║██║╚████║██║╚████║██╔══╝░░██║░░██╗░░░██║░░░    ███████║
105
+ ╚█████╔╝╚█████╔╝██║░╚███║██║░╚███║███████╗╚█████╔╝░░░██║░░░    ╚════██║
106
+ ░╚════╝░░╚════╝░╚═╝░░╚══╝╚═╝░░╚══╝╚══════╝░╚════╝░░░░╚═╝░░░    ░░░░░╚═╝
107
+
108
+ WELCOME
109
+
110
+ COLUMN_TEXT = <<-COLUMN
111
+ ░█████╗░  ██████╗░  ░█████╗░  ██████╗░  ███████╗  ███████╗  ░██████╗░
112
+ ██╔══██╗  ██╔══██╗  ██╔══██╗  ██╔══██╗  ██╔════╝  ██╔════╝  ██╔════╝░
113
+ ███████║  ██████╦╝  ██║░░╚═╝  ██║░░██║  █████╗░░  █████╗░░  ██║░░██╗░
114
+ ██╔══██║  ██╔══██╗  ██║░░██╗  ██║░░██║  ██╔══╝░░  ██╔══╝░░  ██║░░╚██╗
115
+ ██║░░██║  ██████╦╝  ╚█████╔╝  ██████╔╝  ███████╗  ██║░░░░░  ╚██████╔╝
116
+ ╚═╝░░╚═╝  ╚═════╝░  ░╚════╝░  ╚═════╝░  ╚══════╝  ╚═╝░░░░░  ░╚═════╝░
117
+ COLUMN
118
+
119
+ GAME_PLAY_PROMPT = <<-PLAY_PROMPT
120
+
121
+ ███████╗███╗░░██╗████████╗███████╗██████╗░  ██╗██████╗░██╗  ████████╗░█████╗░  ██████╗░██╗░░░░░░█████╗░██╗░░░██╗
122
+ ██╔════╝████╗░██║╚══██╔══╝██╔════╝██╔══██╗  ╚█║██╔══██╗╚█║  ╚══██╔══╝██╔══██╗  ██╔══██╗██║░░░░░██╔══██╗╚██╗░██╔╝
123
+ █████╗░░██╔██╗██║░░░██║░░░█████╗░░██████╔╝  ░╚╝██████╔╝░╚╝  ░░░██║░░░██║░░██║  ██████╔╝██║░░░░░███████║░╚████╔╝░
124
+ ██╔══╝░░██║╚████║░░░██║░░░██╔══╝░░██╔══██╗  ░░░██╔═══╝░░░░  ░░░██║░░░██║░░██║  ██╔═══╝░██║░░░░░██╔══██║░░╚██╔╝░░
125
+ ███████╗██║░╚███║░░░██║░░░███████╗██║░░██║  ░░░██║░░░░░░░░  ░░░██║░░░╚█████╔╝  ██║░░░░░███████╗██║░░██║░░░██║░░░
126
+ ╚══════╝╚═╝░░╚══╝░░░╚═╝░░░╚══════╝╚═╝░░╚═╝  ░░░╚═╝░░░░░░░░  ░░░╚═╝░░░░╚════╝░  ╚═╝░░░░░╚══════╝╚═╝░░╚═╝░░░╚═╝░░░
127
+
128
+ ░█████╗░██████╗░
129
+ ██╔══██╗██╔══██╗
130
+ ██║░░██║██████╔╝
131
+ ██║░░██║██╔══██╗
132
+ ╚█████╔╝██║░░██║
133
+ ░╚════╝░╚═╝░░╚═╝
134
+
135
+
136
+ ███████╗███╗░░██╗████████╗███████╗██████╗░  ██╗░██████╗░██╗  ████████╗░█████╗░
137
+ ██╔════╝████╗░██║╚══██╔══╝██╔════╝██╔══██╗  ╚█║██╔═══██╗╚█║  ╚══██╔══╝██╔══██╗
138
+ █████╗░░██╔██╗██║░░░██║░░░█████╗░░██████╔╝  ░╚╝██║██╗██║░╚╝  ░░░██║░░░██║░░██║
139
+ ██╔══╝░░██║╚████║░░░██║░░░██╔══╝░░██╔══██╗  ░░░╚██████╔╝░░░  ░░░██║░░░██║░░██║
140
+ ███████╗██║░╚███║░░░██║░░░███████╗██║░░██║  ░░░░╚═██╔═╝░░░░  ░░░██║░░░╚█████╔╝
141
+ ╚══════╝╚═╝░░╚══╝░░░╚═╝░░░╚══════╝╚═╝░░╚═╝  ░░░░░░╚═╝░░░░░░  ░░░╚═╝░░░░╚════╝░
142
+
143
+ ░██████╗░██╗░░░██╗██╗████████╗
144
+ ██╔═══██╗██║░░░██║██║╚══██╔══╝
145
+ ██║██╗██║██║░░░██║██║░░░██║░░░
146
+ ╚██████╔╝██║░░░██║██║░░░██║░░░
147
+ ░╚═██╔═╝░╚██████╔╝██║░░░██║░░░
148
+ ░░░╚═╝░░░░╚═════╝░╚═╝░░░╚═╝░░░
149
+
150
+ PLAY_PROMPT
151
+
152
+ BEEP_BOOP_BOP = <<-BEEP
153
+ █▄▄ █▀▀ █▀▀ █▀█   █▄▄ █▀█ █▀█ █▀█   █▄▄ █▀█ █▀█
154
+ █▄█ ██▄ ██▄ █▀▀   █▄█ █▄█ █▄█ █▀▀   █▄█ █▄█ █▀▀
155
+ BEEP
156
+
157
+ end
@@ -0,0 +1,19 @@
1
+ class Player
2
+ attr_reader :name,
3
+ :color
4
+
5
+ def initialize (name, color, is_human = true)
6
+ @name = name
7
+ @color = color
8
+ @is_human = is_human
9
+ end
10
+
11
+ def is_human?
12
+ @is_human
13
+ end
14
+
15
+ def set_name(name)
16
+ @name = name
17
+ nil
18
+ end
19
+ end
@@ -0,0 +1,47 @@
1
+ module Title
2
+ TITLE = <<-BANNER
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
+ BANNER
46
+ TITLE.freeze
47
+ end
@@ -0,0 +1,15 @@
1
+ require 'date'
2
+
3
+ class Turn
4
+ attr_reader :row,
5
+ :col,
6
+ :color,
7
+ :timestamp
8
+
9
+ def initialize(row, col, color)
10
+ @row = row
11
+ @col = col
12
+ @color = color
13
+ @timestamp = DateTime.now
14
+ end
15
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ConnectFour2301
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "connect_four_2301/version"
4
+
5
+ module ConnectFour2301
6
+ class Error < StandardError; end
7
+ # Your code goes here...
8
+ end
@@ -0,0 +1,4 @@
1
+ module ConnectFour2301
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
data/src/title.jpg ADDED
Binary file
data/src/title.txt ADDED
@@ -0,0 +1,42 @@
1
+ ;8.8.8.888:SSX8.88.8.8.88:8.88:88:888888X8:88:8.88:8.88:88:8888888;8.8.8.8.8.88:8.88.88@8;88.8.8.88:8.8.8.8.8.888888:88:8.88:8.88:8.88:@X8;88.8.8.8.88
2
+ ;8:S:.S8X8@X%t;S8@8t:X8;8:X..88%888;;. .888.8;.S8;.X8;8:8 8St;..:S88:.%88;S;.@8: 888Xtttt;888S8; @8:.S8.88888 :. .%88 8;.S8;.X8;. X8@XXSt:.%8S8;.S8..8
3
+ ;; 8;8X :;t: @8.888: t8.  .  8 S@%%.:;% 8X  8; ..:8t88t88 % 88%8; 88. 88 8 888:.88: %8; ...:. tS;8.8:
4
+ ;; S@  :::@8t8:.t8  8 8t.;%S:S; .  @ 8;8.tX88t  .:8..8:8.8 8  8.8:8:8X . tt8@t8.
5
+ ;:.@ . .8888.88  .  888;.t8 .   88;88@S . ..;8%8; . . 8 t8:S888 . ...8: S
6
+ : 8 . ...8; X8   8;..8 .    t%;@ . ..Xt8.:  88t.; . :.S@8
7
+ :;; .  SSt8@ . . . ;8 8; . . 8%:8 . . X88t . . .8888 . . 8;
8
+ :.8 @8;S . tSt8 . . . 8t:; 8S.8 . .X8%@ . S%8
9
+ :%8 %S888 . . . . 88%8S . . . . 8: % @8 ; . . . . S8;X8 X8;
10
+ :8@ t 8;8%S . . . . 88%88 . . . . 88S88 S;888. . . . t88;8 . 8tX
11
+ ;.:@ t: .%8:;t8 8 . . . . 88 S888 8 . . . . ;8;tS8@;; .8:8:8. .. . . %@X@X8t8%8 8tS% . 8 8.
12
+ 8;%:@8::; . 8;8:Xt8t8:8  . .. ;.8%8:8:8@ 8 . . . S..8.:.@8@t::; . . @S.tt S.88 8 . . @@88 @ 88@XX88%S; . :8;8: 
13
+ ; S:X.% .::; ... .:8t888:.SX:8%88 . @88:tS.St8t.;88 . 8888:8.;:@88t ..: .8:%8t..8%8;8 8  S%@@::;;..:..X:.St:;; . . . %t8; S.
14
+ ;t8SX;:t 8@...:;@88S:S%: Xt8;.X8X88%t88@8X8S@X888@X8@@88X8@;8%8@@X88%888X@@88S@Xt8@8@X8X8XXS%8:@SS888S8888;X8888@8@.S.S :::;:: S::8@X8S...:t888;:X8S88
15
+ ;.X8: tX:8%;%tt:@8%t;8.8:8: Xt8tX8X;t8Xt@t%.t88X%t@88;t88.%8.%X8@%8@:888;t88S;SX::ttS8.%SS.:S;8..88;;t88@ttS8%%S;S%;tX8 8 8 8StS::.:.8:%%;;88;.8.8:.@8
16
+ ;t8:8;;8 .  .8 8:t8; %%8@888888@@88S88888@88@@8S888S88X@@@8X888@XX88@@88@8@S8XX@@88888888@888X88X@8@88X888X; .@8 888888@.;S:;88    @8  S8S8;
17
+ ;.%S.@  8 t:.%8888:.::.:.:.....::.. :.:;; :;. .::::;t.:... :...::.:.:..:...:.:.:... .;;::..::..:;..: X.8  8X8 8X@8ttX::  8X 88::X8
18
+ ;:8.8 . 8@ 88SS8@X;;XSt;. ... .. :S%@:. ...;@S:....t@t:tXX;....tXS:;XSSSSS;:... ;SXt;. ..SSSSSSSS;....X8 8888888 8@%S:..  8 .X:.@
19
+ ;.XS .  88% .X8@t %%X;:. SX%S tS88..X .88...S 8...@@ ..8. @%.. . .8X@; X: :t . 8 .: @ @X@8S8S88S;tS:.;   8:;8
20
+ ;t8 . . %X.; 8t . @X% : @X X8.: SXX . %8 % : 8;..@ :8  : @X .S 8S .@X@@8.  . 8@; : %tS@8 .tS8 ::88@8X8X@8X88S8XSS:. . .  8%;
21
+ ;%. . . 8;;.88..:@;:S%.::;@X..;%;:tXt. 8%t ...XS.8 .8. .. @@ X @S %.:;:S%.:@8::X:X::...:. %.:;;X88S88888XS8S8@ t@;8X@S . t::
22
+ ;:8 . . :8%t @ ; ::. .XXX@. X .... .. .8  :S..@@8..8  .X:.SXt .@S .%8@X8% S ...  .XXX. ;: %.:88 888  ;@tX%@88@S%;;%% ; . . 8 %
23
+ ; 8 . . . . ;8%t 8. % ...  X S ...  ; 8  Xt .@t .8  t8..XX 8S : %X  ...  . t. % 8X @X@@ X:@8X8@8@t:::.8.; . . 8::
24
+ ;t8% . . . . .. @ @ St.t t:..;888%SX :@;:..;  .;8;. S:;.. ..8 ..;.. . . @S X888t  %.....@t88:. t: % :8888 8%@8888888@X88X@ 8::.. . . 88:X
25
+ ;.t@%8  . . @8t  %8 :St@:.:t8.8S. :XtS; @X %. % 8.. .8 ..; 8....8S..8tt%8: 8..X%%@:..:t: t; % ;8S888S8888S@@8 8@8 S@ 8:; . . .. 8X:;.
26
+ ;.;%8t88 . . .. ..t%S. 8S . 8 ...  X SX X :X ; . 8. .. . X @t . . :S; X:.:. t..X.:88S@@8X@@@8@88888888t 8.t. . . .. S@. t:
27
+ ;8tSS8X88 . %88 SX@8@%;t@t;S8;:.  ..;8ttS8t... S.:;.. :::;:X..;...:;::;8.:;;t;8 .. S@;;X8:  . t..X.@%@%X8@%%t@8X 8@X8 @%: 8:%. . ;@88. 8%;
28
+ ;88;8;8;X88.888%:88;.888:@8X 8@ X S  S S S   X S S   S S   S  S S %   S     % S  S S S X S   88 ;SX88 @S8%8  t8;:888%;88;8:8%8t:
29
+ ;: %8.88@X88..%@XX@t8t:.S88.8;88@8%St@%S@88S%8t@@888888@8%8X%SSXX@888888888888X8@8;XX%%SXS88;88888888X888S8@@S%@SS8XX.;888888X;%:.88S8St.:%8@.8.%88;%.
30
+ ;.88: Xt .. .. 8X;S.:88:888t 8t8.888.888t8  t8;88.888.888@  @88.888.88888.  S :t%;SSt;: X:.@ . .   88.::8.
31
+ ;S;8S@ .....@%:88t X:X  8 8X8t.. @8@  .tXX8:..88SS  . t8S8;..%8 8ttSXX 8 8@XS@S:8.;  88  8: %S
32
+ ;8:8: .. ..XX8t.::.  8 8.8.:88  .. @.;%ttS  . SX.8888: SX@XX@@8888@@X@8;%: .  8 8%8;
33
+ :.X;. . . ..Xt ;8 . .   8 ::8  . t88t:8  ...X8t8tX .. .  X8:88 ... . .  8;%
34
+ ::X.. . .. @X:8: . .  8%8@S  . S;88  ..t@:8S  St8.; . .  8%8
35
+ : @ . .. 88:  . . .8;8S  . . 8. 8  . 8::8 XtX8 . . . 8;
36
+ :%8 . S8 % . . . . @8.S:  : 8%%8  . . 8%88 . %8;X8 . . . . S;.
37
+ :8X t @;t8t . . . .  ::;X 888@; X8;8 . . . X88%: . . 8t;
38
+ ;::@ ; . . 8:;888   . . . . .. XX %8XSt; . 8X.8.@t:: 8t8:88 % . . . :8%8::X . . . . . XS %
39
+ ;:.88%:: . 8. 8;:X888 . . . t88.8;88 t:; . Xt8:88:S;::: . 8;8.tS;8t;. . .8. %8%8;@  . . ..:88;8
40
+ ;:.8:@S.:: . . %8:8;8.;;@8 8 . .. .88.%8: @8X8t.:: . . ..8t8; @8;.88:..: . .;8%888;:S.@X..:. . . . %8: 8888%8888 . .. .88 S8;
41
+ ;.:8.;;8;S% .:@8@;%.;S88; t88:8.:. :;8 88%;.%8S8;8t%t8S ..;88;:8:SX8;;;8%8S8% ..%8@;8;.X;.:S::;8 %% .:@88;888...888X888 .. :t8.88t8: S
42
+ ;.8: %%%:8%@;@8:8:.::8;8.8:8t8;S8t:88X888;8: X%S:t%8; SS;8;8t8t@8.8%8;888;8.t%8:S;:8%.S8;8.8%8;.;S; :%;.t%t.8%8t88:8::8:88: :t;8;t.8%8%88888.8. S8. 88
metadata ADDED
@@ -0,0 +1,66 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: connect_four_2301
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Branden Ge
8
+ - Alec Kapicak
9
+ autorequire:
10
+ bindir: exe
11
+ cert_chain: []
12
+ date: 2023-02-23 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: This project is a recreation of the popular Connect Four game. It is
15
+ playable from the command line and features color ASCII art
16
+ email:
17
+ - 86636108+brandenge@users.noreply.github.com
18
+ executables: []
19
+ extensions: []
20
+ extra_rdoc_files: []
21
+ files:
22
+ - ".rspec"
23
+ - Gemfile
24
+ - LICENSE.txt
25
+ - README.md
26
+ - Rakefile
27
+ - c4_runner.rb
28
+ - connect_four_2301.gemspec
29
+ - lib/connect_four_2301.rb
30
+ - lib/connect_four_2301/board.rb
31
+ - lib/connect_four_2301/game.rb
32
+ - lib/connect_four_2301/messages.rb
33
+ - lib/connect_four_2301/player.rb
34
+ - lib/connect_four_2301/title.rb
35
+ - lib/connect_four_2301/turn.rb
36
+ - lib/connect_four_2301/version.rb
37
+ - sig/connect_four_2301.rbs
38
+ - src/title.jpg
39
+ - src/title.txt
40
+ homepage: https://github.com/brandenge/connect_four
41
+ licenses:
42
+ - MIT
43
+ metadata:
44
+ homepage_uri: https://github.com/brandenge/connect_four
45
+ source_code_uri: https://github.com/brandenge/connect_four
46
+ changelog_uri: https://github.com/brandenge/connect_four
47
+ post_install_message:
48
+ rdoc_options: []
49
+ require_paths:
50
+ - lib
51
+ required_ruby_version: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: 2.6.0
56
+ required_rubygems_version: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ requirements: []
62
+ rubygems_version: 3.1.4
63
+ signing_key:
64
+ specification_version: 4
65
+ summary: Connect Four game playable from the command line
66
+ test_files: []