Sha256: ab3aa500551373cd228b9cb51ebbbcc8ff3c32de4e57d9d412f869db6597e923

Contents?: true

Size: 1.09 KB

Versions: 2

Compression:

Stored size: 1.09 KB

Contents

# Gameboard::Board!

**CHALLENGE: WRITE A BOARD GEM!**

## Contribution Standards

- Tests on Pull Requests
- [Beautiful Code!](https://github.com/styleguide/ruby)

## Requirements

- A `Gameboard::Board` class.

- Instantiate it with:
  - Height
  - Width
  - Default Value for the cells, otherwise they are empty.

- The board is full of `Gameboard::Cell`s which have the following properties:
  - Coordinates -- Make make this is its own `Gameboard::Coordinates` class with an X and Y value
  - Value
    - This would be the checker in checkers, piece in chess, mine in minesweeper...

- Includes the Enumerable module.

- Methods, for modifying Board data:
  - Gameboard::Board.randomize(value)
  - Gameboard::Board.set_cell([x,y], value)
  - Gameboard::Board.flip (rage reset the board)

- Methods for returning different arrangements of cells of the on the board:
  - Gameboard::Board.horizontal
  - Gameboard::Board.vertical
  - Gameboard::Board.diagonal

- Methods for returning cells:
  - Gameboard::Board.find_cell([x,y])
  - Gameboard::Board.delta([x,y],[slope])
  - Gameboard::Board.neighbors([x,y])


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gameboard-4.0.0 README.md
gameboard-3.5.0 README.md