Skip to content

Commit

Permalink
Integer is class in Ruby
Browse files Browse the repository at this point in the history
- Also fixes trailing white space in hints file.
  • Loading branch information
kotp committed Sep 22, 2023
1 parent 320b0f7 commit de46a53
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions exercises/concept/chess-game/.docs/hints.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
## 1. Define rank & file range

- You need to define two [constant][constants] that should hold a [`Range`][range] of ranks and files.
- The ranks should be an [`Int`][integers] `range` from 1 to 8.
- The ranks should be an [`Integer`][integers] `range` from 1 to 8.
- The files should be a [`String`][string] `Range` from 'A' to 'H'.
- The constant needs to be defined in the `Chess` [module][module].

## 2. Check if square is valid

- You need to check if a value is within a range.
- There is [a method][include] that can be used to check if a value is within a range.
- There is [a method][include] that can be used to check if a value is within a range.

## 3. Get player's nickname

Expand Down
2 changes: 1 addition & 1 deletion exercises/concept/chess-game/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Chess::Files
The game will have to check if a square is valid.
A square is valid if the rank and file are within the ranges of the ranks and files.

Define the `Chess.valid_square?` method that takes the arguments `rank` that holds an int of the rank and `file` that holds a char of the file.
Define the `Chess.valid_square?` method that takes the arguments `rank` that holds an integer of the rank and `file` that holds a char of the file.
The method should return `true` if the rank and file are within the ranges of the ranks and files and return `false` otherwise.

```ruby
Expand Down
2 changes: 1 addition & 1 deletion exercises/concept/chess-game/.docs/introduction.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Ranges

[Ranges][range] represent an interval between two values.
The most common types that support ranges are `Int` and `String`.
The most common types that support ranges are `Integer` and `String`.
They can be used for many things like quickly creating a collection, slicing strings, checking if a value is in a range, and iteration.
They are created using the range operator `..` or `...` (inclusive and exclusive, respectively).

Expand Down

0 comments on commit de46a53

Please sign in to comment.