basketball 0.0.23 → 0.0.24

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e72d5e9ae7173e7906499f251db75f25d65ead4cf7cf6a8171f615a7821ba2fb
4
- data.tar.gz: 744511e1ce1b8dce785cc3dfbf18cb8e5e1e355c9686226b03703ccaddc29468
3
+ metadata.gz: f4d71547c798597b5a43d6a1f0bffc22c68c4346b2d7d6973c01eefbef0cc522
4
+ data.tar.gz: d3fca442ba007c556df2c0a8be33b01bbfc9214b4653ae1e53c48db66190db3e
5
5
  SHA512:
6
- metadata.gz: '0868c8152e6e0c1e52554b0546d289678c23fd73a3b855c42b9fe48982ee2decfe9d6b6433b72632909bdee64debb16169288fc423f5f16368d98a90b85f33bd'
7
- data.tar.gz: eb0e17d0273548cffbf3dde7b96dda4655461939997723619e5be125fd56ebe24d0ec6ce7c82edfefa76d529e022dafb2b703b533e9553b9a867e3ae9bf1aef8
6
+ metadata.gz: d3bc55672805234e35f7f474fd9da0549854179d6d1a46d069116f5996f50ac8b1c4c59efbc5c1ca847b46f88b97ae784980dcd5913c10d49163ec6e0bb8dd0a
7
+ data.tar.gz: 78233da87c02580f3729c87d5d959ca558200a792e53e1800f8cfb4b37096968ab50b7ecf8c399e0b299f49f80abbb6d90802b39b4c4c53d2a5fd069e8d501d3
@@ -4,7 +4,7 @@ module Basketball
4
4
  module Season
5
5
  # Sets boundaries for exhibition and regular season play. Add games as long as they are
6
6
  # within the correct dated boundaries
7
- class Calendar
7
+ class Calendar < Entity
8
8
  class OutOfBoundsError < StandardError; end
9
9
  class TeamAlreadyBookedError < StandardError; end
10
10
 
@@ -21,6 +21,8 @@ module Basketball
21
21
  regular_end_date:,
22
22
  games: []
23
23
  )
24
+ super()
25
+
24
26
  raise ArgumentError, 'exhibition_start_date is required' if exhibition_start_date.to_s.empty?
25
27
  raise ArgumentError, 'exhibition_end_date is required' if exhibition_end_date.to_s.empty?
26
28
  raise ArgumentError, 'regular_start_date is required' if regular_start_date.to_s.empty?
@@ -111,7 +111,7 @@ module Basketball
111
111
  end
112
112
 
113
113
  def players
114
- conferences.flat_map(&:players) + free_agents
114
+ signed_players + free_agents
115
115
  end
116
116
 
117
117
  def conference_for(team)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Basketball
4
- VERSION = '0.0.23'
4
+ VERSION = '0.0.24'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: basketball
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.23
4
+ version: 0.0.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Ruggio
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-06-24 00:00:00.000000000 Z
11
+ date: 2023-06-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: " This library is meant to serve as the domain for a basketball league/season
14
14
  simulator/turn-based game. It models core ideas such as: players, general managers,