From c4528c3768c11e05166048c5d7220e3c94b846f5 Mon Sep 17 00:00:00 2001 From: Adam <24621027+adoyle0@users.noreply.github.com> Date: Thu, 26 Jan 2023 02:54:42 -0500 Subject: [PATCH] makes more sense --- src/components/Rotor.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/Rotor.js b/src/components/Rotor.js index 2f960f0..d0e4643 100644 --- a/src/components/Rotor.js +++ b/src/components/Rotor.js @@ -2,16 +2,16 @@ import React from 'react'; import './Rotor.css'; class Rotor extends React.Component { - letter(i) { + letter(pos) { const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' - if (i > 25) { - return alphabet[i - 26] + if (pos > 25) { + return alphabet[pos - 26] } - else if (i < 0) { - return alphabet[26 + i] + else if (pos < 0) { + return alphabet[26 + pos] } else { - return alphabet[i] + return alphabet[pos] } } render() {