Skip to content

Commit

Permalink
using character to show potential absolute value
Browse files Browse the repository at this point in the history
  • Loading branch information
Elixonus committed Jul 16, 2024
1 parent c7afbbc commit 7b205bf
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions charges/text.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
try:
from math import sqrt
from random import choice, randint
from string import ascii_letters
from rich.console import Console
from charges import System
from points import Point

letters = "$@B%8&WM#*oahkbdpqwmZO0QLCJUYXzcvunxrjft/\\|()1{}[]?-_+~<>i!lI;:,\"^`'."
console = Console()


Expand Down Expand Up @@ -62,9 +62,8 @@ def text_system(
color = f"rgb({255},{channel},{channel})"
else:
color = "rgb(255,255,255)"
console.print(
choice(ascii_letters) + choice(ascii_letters), style=f"{color}", end=""
)
letter = letters[min(max(round((len(letters) - 1) * abs(normal)), 0), len(letters) - 1)]
console.print(letter + letter, style=f"{color}", end="")
for _ in range(2):
console.print("#", style="rgb(90,90,90)", end="")
for _ in range(2):
Expand Down

0 comments on commit 7b205bf

Please sign in to comment.