diff --git a/lib/game_client.rb b/lib/game_client.rb index e82fe12..3c87cb4 100644 --- a/lib/game_client.rb +++ b/lib/game_client.rb @@ -10,7 +10,7 @@ require_relative 'messages/maplist_entry_add' require_relative 'messages/maplist_entry_rem' require_relative 'packer' require_relative 'context' -require_relative 'snapshot' +require_relative 'snapshot/unpacker' class GameClient attr_accessor :players, :pred_game_tick, :ack_game_tick diff --git a/lib/snap_items/character.rb b/lib/snapshot/items/character.rb similarity index 98% rename from lib/snap_items/character.rb rename to lib/snapshot/items/character.rb index 3197d7a..94489bf 100644 --- a/lib/snap_items/character.rb +++ b/lib/snapshot/items/character.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../packer' +require_relative '../../packer' class NetObj class Character diff --git a/lib/snap_items/game_data.rb b/lib/snapshot/items/game_data.rb similarity index 98% rename from lib/snap_items/game_data.rb rename to lib/snapshot/items/game_data.rb index 8e09f77..1e38454 100644 --- a/lib/snap_items/game_data.rb +++ b/lib/snapshot/items/game_data.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative '../packer' +require_relative '../../packer' class NetObj class GameData diff --git a/lib/snapshot.rb b/lib/snapshot/unpacker.rb similarity index 98% rename from lib/snapshot.rb rename to lib/snapshot/unpacker.rb index a164c72..2e77746 100644 --- a/lib/snapshot.rb +++ b/lib/snapshot/unpacker.rb @@ -1,8 +1,8 @@ # frozen_string_literal: true -require_relative 'snap_items/game_data' -require_relative 'snap_items/character' -require_relative 'packer' +require_relative 'items/game_data' +require_relative 'items/character' +require_relative '../packer' class SnapshotUnpacker def snap_single(chunk)