Skip to content

Instantly share code, notes, and snippets.

@lucianoschillagi
Created October 19, 2024 15:51
Show Gist options
  • Save lucianoschillagi/54eaaa7e83d18d159e68f1beb45934f0 to your computer and use it in GitHub Desktop.
Save lucianoschillagi/54eaaa7e83d18d159e68f1beb45934f0 to your computer and use it in GitHub Desktop.
percentage graphic representation
import Foundation
enum Percentaje: String {
case ten = "◉ ○ ○ ○ ○ ○ ○ ○ ○ ○"
case twenty = "◉ ◉ ○ ○ ○ ○ ○ ○ ○ ○"
case thirty = "◉ ◉ ◉ ○ ○ ○ ○ ○ ○ ○"
case fourty = "◉ ◉ ◉ ◉ ○ ○ ○ ○ ○ ○"
case fifty = "◉ ◉ ◉ ◉ ◉ ○ ○ ○ ○ ○"
case sixty = "◉ ◉ ◉ ◉ ◉ ◉ ○ ○ ○ ○"
case seventy = "◉ ◉ ◉ ◉ ◉ ◉ ◉ ○ ○ ○"
case eighty = "◉ ◉ ◉ ◉ ◉ ◉ ◉ ◉ ○ ○"
case ninety = "◉ ◉ ◉ ◉ ◉ ◉ ◉ ◉ ◉ ○"
case hundred = "◉ ◉ ◉ ◉ ◉ ◉ ◉ ◉ ◉ ◉"
var graphicRepresentation: String { self.rawValue }
}
let selectedPercentaje = Percentaje.hundred
print(selectedPercentaje.graphicRepresentation)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment