This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum WorldParser { | |
/// process a world string, example: | |
/* | |
treasure | |
3x3 | |
gold diamond gold | |
diamond gold diamond | |
gold diamond gold | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum Debug { | |
enum Level: String { | |
case error = "Error" | |
case warning = "Warning" | |
case log = "Log" | |
case network = "Network" | |
case success = "Success" | |
case note = "Note" | |
case sound = "Sound" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Use UIKit blurs in SwiftUI. | |
struct VisualEffectView: UIViewRepresentable { | |
/// The blur's style. | |
public var style: UIBlurEffect.Style | |
/// Use UIKit blurs in SwiftUI. | |
public init(_ style: UIBlurEffect.Style) { | |
self.style = style | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Chihuahua | |
Japanese spaniel | |
Maltese dog, Maltese terrier, Maltese | |
Pekinese, Pekingese, Peke | |
Shih-Tzu | |
Blenheim spaniel | |
papillon | |
toy terrier | |
Rhodesian ridgeback | |
Afghan hound, Afghan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct ContentView: View { | |
var numberOfSegments = 4 | |
@State var currentSegment: Int? | |
@State var autoIncrementing = false | |
var period = CGFloat(0.8) | |
var body: some View { | |
VStack { | |
Text("Progress") | |
.bold() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Use UIKit blurs in SwiftUI. | |
struct VisualEffectView: UIViewRepresentable { | |
/// The blur's style. | |
public var style: UIBlurEffect.Style | |
/// Use UIKit blurs in SwiftUI. | |
public init(_ style: UIBlurEffect.Style) { | |
self.style = style | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// PhotosVC+Tips.swift | |
// Find-3 | |
// | |
// Created by A. Zheng (github.com/aheze) on 10/4/22. | |
// Copyright © 2022 A. Zheng. All rights reserved. | |
// | |
import Popovers | |
import SwiftUI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct ContentView: View { | |
static let fadeInDuration = CGFloat(1.1) | |
static let pulseDuration = CGFloat(1.6) | |
static let fadeOutDuration = CGFloat(0.3) | |
static let interval = CGFloat(1.6) | |
@State var isAnimating = false | |
@State var timer = Timer.publish(every: interval, on: .main, in: .common).autoconnect() | |
@State var circlesIDs = [UUID()] |