Lesson: Behavior-Driven Development (BDD), Red-Green-Refactor, RSpec, Ruby Code Styling, Naming Conventions and commits.
Project: Queen Attack In chess, a queen can move horizontally, vertically, and diagonally, making it the most powerful piece on the board. If another piece is within its line of sight, the queen can attack it. Make a method that is called on the position on the board of the queen and takes as an argument the position of the other piece. The method should tell whether the queen can attack the other piece.
Behavior | Input | Output |
---|---|---|
coordinates are not horizontally, vertically, or diagonally in line with each other | [1,1] [2,3] | false |
coordinates are horizontally in line with each other | [1,1] [2,1] | true |
coordinates are vertically in line with each other | [1,1] [1,2] | true |
coordinates are diagonally in line with each other | [1,1] [2,2] | true |
- Clone this repository onto your computer
- Run rspec to see tests pass
No known bugs
If you have any questions please feel free to contact Maldon or Noah on github
- Ruby
- Postgres
- Sinatra
MIT License
Copyright (c) 2016, Maldon Meehan & Noah Yasskin, Epicodus