From de46a5306fae988c09d6a6765422244088cd05fc Mon Sep 17 00:00:00 2001 From: KOTP Date: Thu, 21 Sep 2023 22:48:58 -0400 Subject: [PATCH] Integer is class in Ruby - Also fixes trailing white space in hints file. --- exercises/concept/chess-game/.docs/hints.md | 4 ++-- exercises/concept/chess-game/.docs/instructions.md | 2 +- exercises/concept/chess-game/.docs/introduction.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/concept/chess-game/.docs/hints.md b/exercises/concept/chess-game/.docs/hints.md index f8442ba6d7..6afc40f8bb 100644 --- a/exercises/concept/chess-game/.docs/hints.md +++ b/exercises/concept/chess-game/.docs/hints.md @@ -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 diff --git a/exercises/concept/chess-game/.docs/instructions.md b/exercises/concept/chess-game/.docs/instructions.md index 58326fbb3c..8204d01340 100644 --- a/exercises/concept/chess-game/.docs/instructions.md +++ b/exercises/concept/chess-game/.docs/instructions.md @@ -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 diff --git a/exercises/concept/chess-game/.docs/introduction.md b/exercises/concept/chess-game/.docs/introduction.md index a928977e16..3f071de648 100644 --- a/exercises/concept/chess-game/.docs/introduction.md +++ b/exercises/concept/chess-game/.docs/introduction.md @@ -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).