Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
56e3dbc
1. identified acute angel and it's function
Bluejay600 Jun 14, 2025
d4a0730
Identified Obtuse Angles when the angle is greater than 90 and less t…
Bluejay600 Jul 5, 2025
f6cd051
Identified Stright Angle s when the angle is 180 degree
Bluejay600 Jul 5, 2025
59a1e19
Identified stright angle when the angle is greater than 180
Bluejay600 Jul 5, 2025
a0004a8
1. Added 4 if conditions to the function getAngleType(angle).
Bluejay600 Jul 6, 2025
c7772a6
Merge branch 'Sprint3-Test-branch' of https://github.com/Bluejay600/M…
Bluejay600 Jul 6, 2025
eb50828
1. Added a test line to each case.
Bluejay600 Jul 6, 2025
b797a92
added a false return value to handle the case for improper fractions
Bluejay600 Jul 6, 2025
f5f36f5
1. wrote test, and make it pass, to build solution up methodically.
Bluejay600 Jul 7, 2025
a467519
Added 4 if conditions in the function getAngleType(angle) to build up…
Bluejay600 Jul 7, 2025
18a93a1
Added a return invalid angle to handle angles outside the range of 0 …
Bluejay600 Jul 7, 2025
3523e59
Identified and corrected the right angle when the angle is exactly 90…
Bluejay600 Jul 7, 2025
d6a2edf
Added assertion to the negative fraction to equal true.
Bluejay600 Jul 7, 2025
67a05da
Added assertion to the equal numerator and denominator, and a console…
Bluejay600 Jul 7, 2025
5a1570a
Stretched creating Zero Numerator check assertion.
Bluejay600 Jul 7, 2025
61decd0
implemented the function getCardValue(card) and added if conditions t…
Bluejay600 Jul 7, 2025
8e295aa
wrote the test code and added a line to pass the test.
Bluejay600 Jul 7, 2025
4b2e240
fixed the getCardValue function to handel card 10
Bluejay600 Jul 7, 2025
a1f0f58
Handled face Cards (J, Q, K) to return the value 10.
Bluejay600 Jul 7, 2025
ec30fb1
Added a code to handle a card with invalid rank (Z)
Bluejay600 Jul 7, 2025
a0595c0
Replaced the code my code in 1-key-implement and tested
Bluejay600 Jul 7, 2025
eda20da
Merge branch 'Sprint3-Test-branch' of https://github.com/Bluejay600/M…
Bluejay600 Jul 7, 2025
b0904d1
fixed acute angle test code to make the description clear.
Bluejay600 Jul 8, 2025
fca4456
removed the duplicated test for Acute angle
Bluejay600 Jul 8, 2025
71bac2d
1. removed unwanted spaces.
Bluejay600 Jul 9, 2025
3e96df9
1. removed the function and replaced with the function in the 1-key-i…
Bluejay600 Jul 10, 2025
2b1c9be
1. Replaced the comment and added angle 45 in the function.
Bluejay600 Jul 10, 2025
3a5be71
1. Identified Obtuse angles (90 < angle < 180 )
Bluejay600 Jul 10, 2025
da42c37
1. Identified reflex angles when angle is greater than 180 and less t…
Bluejay600 Jul 10, 2025
c9b0ff6
1. Identified Invalid angle when it's less than 0 or greater than 360.
Bluejay600 Jul 10, 2025
fd37f69
1. identified right angle.
Bluejay600 Jul 10, 2025
f242d6a
1. removed the extra space between test and the opening parenthesis:
Bluejay600 Jul 10, 2025
fee695d
added my completed function from key-implement.
Bluejay600 Jul 10, 2025
abcdfbf
identified improper fractions to case 2.
Bluejay600 Jul 10, 2025
af20de9
replaced the whole code with the one in card value in key-implement.
Bluejay600 Jul 10, 2025
7076fc0
Handled Number Cards (2-10):
Bluejay600 Jul 10, 2025
9ef7886
1. Handled Face Cards (J, Q, K):
Bluejay600 Jul 10, 2025
1b10f2d
handled invalid cards.
Bluejay600 Jul 10, 2025
7d4ba19
joined the two Ace functions in one.
Bluejay600 Jul 10, 2025
49b7c00
initialized counter to keep track of occurrences
Bluejay600 Jul 10, 2025
f85e00c
1. initialized a counter for the function.
Bluejay600 Jul 10, 2025
f3973af
Added test tarbet string
Bluejay600 Jul 10, 2025
3b2251a
added a test to Handle count of 0.
Bluejay600 Jul 10, 2025
58a71c3
Added a test to handle a negative count.
Bluejay600 Jul 10, 2025
1a74ee8
Implemented a function repeat that that given a target string str and…
Bluejay600 Jul 10, 2025
ebc99d8
Function was handling the case for 1st. I expanded to handle other n…
Bluejay600 Jul 10, 2025
af1e3ca
implemented case one and case 2 testing.
Bluejay600 Jul 11, 2025
cab246a
Merge branch 'CodeYourFuture:main' into Sprint3-Test-branch
Bluejay600 Jul 11, 2025
a64cee4
Played computer with the password validator
Bluejay600 Jul 11, 2025
a451aeb
Merge branch 'Sprint3-Test-branch' of https://github.com/Bluejay600/M…
Bluejay600 Jul 11, 2025
0c2e433
Merge branch 'CodeYourFuture:main' into Sprint3-Test-branch
Bluejay600 Jul 20, 2025
93e7226
edited on the if condition deleted the frist 3 if condition for they …
Bluejay600 Jul 21, 2025
3def433
Merge branch 'Sprint3-Test-branch' of https://github.com/Bluejay600/M…
Bluejay600 Jul 21, 2025
01b8f85
deleted unwanted function in rpeat.js file.
Bluejay600 Jul 22, 2025
65ebbe0
updated the test to cover all the valid integer.
Bluejay600 Jul 22, 2025
06f29cf
1. Replaced the wrong closing brace } at the end with proper logic.
Bluejay600 Jul 24, 2025
b9be3e1
added examples of previous passwords as constant list of arrays.
Bluejay600 Jul 24, 2025
13b9a1d
added a simecolumn after the closing of the function.
Bluejay600 Jul 24, 2025
162d5c6
added test conditions to the test file
Bluejay600 Jul 24, 2025
3a51c69
removed unwanted code or unused code.
Bluejay600 Jul 24, 2025
ebf4f7a
removed empty spaces.
Bluejay600 Jul 24, 2025
acebd47
1. fixed the code to Check for 10 before number range.
Bluejay600 Jul 24, 2025
c3c7466
1. Used toBe() instead of toEqual() for primitive numbers (toEqual()…
Bluejay600 Jul 25, 2025
3726f5d
Combined face cards returning value of 10 in one cade and removed the…
Bluejay600 Jul 25, 2025
fb91b98
completed the test file by adding the missing test for no occurrences
Bluejay600 Jul 25, 2025
fdcab1c
Updated the implementation of the function in the count.js file.
Bluejay600 Jul 25, 2025
7ba1ca2
removed unused code or function.
Bluejay600 Jul 25, 2025
efe7197
Updated the function to handel group of numbers.
Bluejay600 Jul 25, 2025
c56ecc4
added a group category to the frist test.
Bluejay600 Jul 25, 2025
0be4dc2
added the group category for the second test code.
Bluejay600 Jul 25, 2025
a5aa914
Edited three more test calls with group of number category test.
Bluejay600 Jul 25, 2025
ad76b58
Removed the rest of the unwanted test examples.
Bluejay600 Jul 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added a code to handle a card with invalid rank (Z)
  • Loading branch information
Bluejay600 committed Jul 7, 2025
commit ec30fb1b83de0c131066e8ae976e1d8c3a738ce0
8 changes: 8 additions & 0 deletions Sprint-3/1-key-implement/3-get-card-value.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,16 @@ assertEquals(kingOfSpades, 10);
// Given a card with a rank of "A",
// When the function is called with an Ace,
// Then it should, by default, assume the Ace is worth 11 points, which is a common rule in blackjack.
// (Note: In some games, the Ace can also be worth 1 point, but for this function, we will assume it is always worth 11 points.)
const aceOfDiamonds = getCardValue("A♦");
assertEquals(aceOfDiamonds, 11);

// Handle Invalid Cards:
// Given a card with an invalid rank (neither a number nor a recognized face card),
// When the function is called with such a card,
// Then it should throw an error indicating "Invalid card rank."
try {
getCardValue("Z♠"); // Invalid card
} catch (error) {
console.assert(error.message === "Invalid card rank", "Expected error for invalid card rank");
}