vsmithers1087 / ConnectFour

A basic Connect Four game built with SwiftUI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ConnectFour

gameplay

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.

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"))

About

A basic Connect Four game built with SwiftUI


Languages

Language:Swift 100.0%