Project

gameboard

0.0
No commit activity in last 3 years
No release in over 3 years
A clean functional gameboard for CLI games in ruby, that will return and place pieces based on a coordinate system
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 1.13
~> 2.14
~> 4.7.3
~> 0.10
~> 0.2.4
~> 0.1.8
~> 10.0
~> 3.5
~> 0.3
 Project Readme

Gameboard::Board!

CHALLENGE: WRITE A BOARD GEM!

Contribution Standards

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::Cells 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])