Skip to content

Latest commit

 

History

History
64 lines (51 loc) · 2.68 KB

CHANGELOG.md

File metadata and controls

64 lines (51 loc) · 2.68 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

  • No unreleased changes!

Added

  • Grid#each_cell! - Iterates over each cell in the grid, calling the provided block with each cell and updating the cell with the returned value
  • Grid#neighbours - Accessor method to easily fetch the coordinates of cardinal and/or ordinal locations from the given coordinates

Added

  • AocInput#single_line - Strips newline characters from single line puzzle inputs

Added

  • AocInput#process_each_line - Processes each line of the input data using the provided block
  • Grid#includes_coords? - Returns true if the provided coordinates exist within the bounds of the grid
  • Grid#beyond_grid? - Returns true if the provided coordinates exceed the bounds of the grid
  • Grid#locate(value) - Returns the first coordinates within the grid containing the given value
  • Grid#locate_all(value) - Returns an array of coordinates for any location within the grid containing the given value
  • Grid#each_cell - Iterates over each cell in the grid

Changed

  • Grid#cell now returns nil if the provided coordinates to not exist within the grid
  • Grid#set_cell nwo returns nil if the provided coordinates to not exist within the grid

Fixed

  • Grid#dup previously returned a new Grid instance with the same instance of the @grid array within it. Now @grid is a unique copy.

Added

  • Grid class for working with two-dimensional arrays of data
  • AocInput updated with convenience method for creating a Grid from input
  • AocInput#sections added, for splitting input into multiple sections

Added

  • Characters I and T now supported by DotMatrix
  • Updated README with links to documentation
  • Added documentation link to gemspec

Added

  • DotMatrix class for decoding printed puzzle output

Initial release.

Added

  • Created AocInput class with initial helper methods