battlesnake 0.1.1 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,7 @@ module Battlesnake
4
4
  ##
5
5
  # Represents a pair of (x,y) coordinates, and provides helper methods
6
6
  # for managing distance and direction.
7
- class Location
7
+ class Location < Base
8
8
  # @return [Integer] a positive integer representing the distance from the
9
9
  # left side of the board.
10
10
  attr_reader :x
@@ -3,7 +3,7 @@ require 'json'
3
3
  module Battlesnake
4
4
  ##
5
5
  # Represents a single Battlesnake player.
6
- class Snake
6
+ class Snake < Base
7
7
  # @return [Hash] snake as a data structure usable by other objects.
8
8
  attr_reader :as_json
9
9
 
@@ -1,4 +1,4 @@
1
1
  module Battlesnake
2
2
  # The current version of the driver.
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.3"
4
4
  end
data/lib/battlesnake.rb CHANGED
@@ -1,5 +1,7 @@
1
1
  require "battlesnake/version"
2
+ require 'battlesnake/base'
2
3
  require 'battlesnake/board'
4
+ require 'battlesnake/game'
3
5
  require 'battlesnake/location'
4
6
  require 'battlesnake/snake'
5
7
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: battlesnake
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaime Bellmyer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-11-05 00:00:00.000000000 Z
11
+ date: 2023-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -100,8 +100,10 @@ files:
100
100
  - bin/console
101
101
  - bin/setup
102
102
  - docs/Battlesnake.html
103
+ - docs/Battlesnake/Base.html
103
104
  - docs/Battlesnake/Board.html
104
105
  - docs/Battlesnake/Error.html
106
+ - docs/Battlesnake/Game.html
105
107
  - docs/Battlesnake/Location.html
106
108
  - docs/Battlesnake/Snake.html
107
109
  - docs/_index.html
@@ -119,7 +121,9 @@ files:
119
121
  - docs/method_list.html
120
122
  - docs/top-level-namespace.html
121
123
  - lib/battlesnake.rb
124
+ - lib/battlesnake/base.rb
122
125
  - lib/battlesnake/board.rb
126
+ - lib/battlesnake/game.rb
123
127
  - lib/battlesnake/location.rb
124
128
  - lib/battlesnake/snake.rb
125
129
  - lib/battlesnake/version.rb