Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vsmithers1087/ConnectFour
A basic Connect Four game built with SwiftUI
https://github.com/vsmithers1087/ConnectFour
connectfour game swift swiftui
Last synced: 3 months ago
JSON representation
A basic Connect Four game built with SwiftUI
- Host: GitHub
- URL: https://github.com/vsmithers1087/ConnectFour
- Owner: vsmithers1087
- Archived: true
- Created: 2019-07-16T14:05:04.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-09-27T15:40:15.000Z (about 5 years ago)
- Last Synced: 2024-06-26T02:32:00.459Z (5 months ago)
- Topics: connectfour, game, swift, swiftui
- Language: Swift
- Homepage:
- Size: 2.23 MB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- fucking-about-SwiftUI - ConnectFour
README
# ConnectFour
## About
A simple Connect Four game built entirely with SwiftUI. Through working on this project, I have learned that the upsides of using SwiftUI outside of an orthodox single view application are pretty great. While still a work in progress, by viewing this demo it is possible to see in practice the basics of animations and reusing simple components to build more complex custom user interfaces.
You can modify the configuration in `Config.swift` to change everything from the appearance to board dimensions, and the number of tiles required to win.
```swift
let config = GameConfig(playerOneConfig: PlayerConfig(color: .orange, image: Image(systemName: "tortoise")),
playerTwoConfig: PlayerConfig(color: .blue, image: Image(systemName: "hare")),
columns: 7,
rows: 6,
tilesToWin: 4,
primaryColor: .purple,
secondaryColor: .white,
backgroundImage: Image("wallpaper"))```