Swift Soccer: Learn Swift The Fun Way: The Complete First Half
By Rob Garner
()
About this ebook
Have you tried learning Swift, but found other guides detailed and confusing? Dull and no fun? Don’t have an easy theme to follow? Well, with Swift Soccer – The Complete First Half, you’re on to a winner. You’ll discover the basics of Swift while building up to the kick off of a soccer match between LA Galaxy and Barcelona. You’ll learn about: team names and players, using Strings; choosing the players in a team, using Arrays; how Variables change – and how they affect the score; and Functions – by getting our players to score goals! And much more!
You'll see what code is produced - with full, detailed comments, so it’s easy to follow along - and all based on the Swift 3 - the most recent Swift update available. In the meantime, let the game begin!
Rob Garner
I’m a Digital Marketing Manager for an online book retailer, where I also design and produce web banners, graphics etc. I am an experienced developer in HTML and CSS, and I’m helping to teach Apple’s Swift programming language using my fun Swift Soccer approach. As a writer, I was asked to proof-check the website of one of the world’s most famous copywriters, Drayton Bird, and have written many adverts for the BBC. (You may also have heard of me as RobTheWriter.)
Read more from Rob Garner
Tired of Being Tired: How I’m Beating CFS Rating: 3 out of 5 stars3/5Find Your Passion Rating: 1 out of 5 stars1/5
Related to Swift Soccer
Related ebooks
Unleashing the Power of TypeScript Rating: 0 out of 5 stars0 ratingsMission JavaScript Rating: 0 out of 5 stars0 ratingsSwift Essentials - Second Edition Rating: 0 out of 5 stars0 ratingsSwiftUI for Absolute Beginners: Program Controls and Views for iPhone, iPad, and Mac Apps Rating: 0 out of 5 stars0 ratingsSwift 5 for Absolute Beginners: Learn to Develop Apps for iOS Rating: 0 out of 5 stars0 ratingsApple Watch App Development Rating: 0 out of 5 stars0 ratingsBuilding Games with Ethereum Smart Contracts: Intermediate Projects for Solidity Developers Rating: 0 out of 5 stars0 ratingsSnapchat, Login, Filters, Lenses, Updates, Support, Download, App, Apk, ++, Guide Rating: 0 out of 5 stars0 ratingsiOS 13 Programming for Beginners - Fourth Edition: Get started with building iOS apps with Swift 5 and Xcode 11, 4th Edition Rating: 0 out of 5 stars0 ratingsMastering Swift Rating: 0 out of 5 stars0 ratingsLearn Xcode Fast! - A Beginner's Guide To Programming in Xcode: How To Program, #3 Rating: 1 out of 5 stars1/5Golang for Jobseekers: Unleash the power of Go programming for career advancement (English Edition) Rating: 0 out of 5 stars0 ratingsLearn iOS Application Development: Take Your Mobile App Development Skills to the Next Level with Swift and Xcode (English Edition) Rating: 0 out of 5 stars0 ratingsFull Stack JavaScript A Complete Guide - 2019 Edition Rating: 0 out of 5 stars0 ratingsGetting Started with Grunt: The JavaScript Task Runner Rating: 3 out of 5 stars3/5Meteor in Action Rating: 0 out of 5 stars0 ratingsBuilding iOS 17 Apps with Xcode Storyboards: Develop iOS 17 Apps with Xcode 15 and Swift Rating: 0 out of 5 stars0 ratingsAmazon DynamoDB Complete Self-Assessment Guide Rating: 0 out of 5 stars0 ratingsD Cookbook Rating: 0 out of 5 stars0 ratingsOpenCart Theme and Module Development Rating: 0 out of 5 stars0 ratingsSwiftUI Essentials - iOS Edition: Learn to Develop iOS Apps Using SwiftUI, Swift 5 and Xcode 11 Rating: 0 out of 5 stars0 ratingsDrupal 8 Configuration Management Rating: 0 out of 5 stars0 ratingsApplication Development with Swift Rating: 0 out of 5 stars0 ratingsLearning Software Architecture Rating: 0 out of 5 stars0 ratingsScratch For Kids For Dummies Rating: 0 out of 5 stars0 ratingsIntroducing Deno: A First Look at the Newest JavaScript Runtime Rating: 0 out of 5 stars0 ratingsMetaversions: Many men, many minds Rating: 0 out of 5 stars0 ratingsCoding Languages: Angular With Typescript, Machine Learning With Python And React Javascript Rating: 0 out of 5 stars0 ratings
Teaching Science & Technology For You
How to Diagnose and Fix Everything Electronic, Second Edition Rating: 4 out of 5 stars4/5Anatomy & Physiology For Dummies Rating: 5 out of 5 stars5/5How to Think Like a Lawyer--and Why: A Common-Sense Guide to Everyday Dilemmas Rating: 4 out of 5 stars4/5Anatomy & Physiology Workbook For Dummies with Online Practice Rating: 0 out of 5 stars0 ratingsBasic Engineering Mechanics Explained, Volume 1: Principles and Static Forces Rating: 5 out of 5 stars5/5Neuroscience For Dummies Rating: 4 out of 5 stars4/5Airplane Flying Handbook: FAA-H-8083-3C (2024) Rating: 4 out of 5 stars4/5Organic Chemistry I For Dummies Rating: 5 out of 5 stars5/5How to Teach Nature Journaling: Curiosity, Wonder, Attention Rating: 4 out of 5 stars4/5Chemistry For Dummies Rating: 4 out of 5 stars4/5Botany For Dummies Rating: 4 out of 5 stars4/5Raspberry Pi Electronics Projects for the Evil Genius Rating: 3 out of 5 stars3/5Chemistry Rating: 5 out of 5 stars5/5Biology For Dummies Rating: 3 out of 5 stars3/5Microbiology For Dummies Rating: 3 out of 5 stars3/5Programming Arduino: Getting Started with Sketches Rating: 4 out of 5 stars4/5An Introduction to the Periodic Table of Elements : Chemistry Textbook Grade 8 | Children's Chemistry Books Rating: 5 out of 5 stars5/5Science Warm-Ups, Grades 5 - 8 Rating: 5 out of 5 stars5/5Chemistry: Concepts and Problems, A Self-Teaching Guide Rating: 5 out of 5 stars5/5Physics II For Dummies Rating: 4 out of 5 stars4/5HVAC Electrical for Idiots Rating: 0 out of 5 stars0 ratingsAstronomy For Dummies Rating: 3 out of 5 stars3/5Using Markdown: A Short Instruction Guide Rating: 0 out of 5 stars0 ratingsThe School Garden Curriculum: An Integrated K-8 Guide for Discovering Science, Ecology, and Whole-Systems Thinking Rating: 0 out of 5 stars0 ratingsFlipped Learning for Math Instruction Rating: 5 out of 5 stars5/5Biology Rating: 4 out of 5 stars4/5Earth Science Rating: 5 out of 5 stars5/5Nature Preschools and Forest Kindergartens: The Handbook for Outdoor Learning Rating: 4 out of 5 stars4/5Thermodynamics For Dummies Rating: 4 out of 5 stars4/5
Reviews for Swift Soccer
0 ratings0 reviews
Book preview
Swift Soccer - Rob Garner
SWIFT SOCCER
LEARN SWIFT THE FUN WAY
The Complete First Half
Rob Garner
robgarner.net
ISBN-13: 978-1537363219
ISBN-10: 1537363212
Copyright © Rob Garner 2016. All rights reserved
It’s not easy trying to learn Swift, Apple’s programming language. However, as I’ve gone through various tutorials, books, articles and blogs, I realised that what I needed was some kind of fun connection with how I was learning. And so Swift Soccer was born...
Let the game begin!
NOTE: Where you see two slashes in green, like this:
// Barcelona
or
// 3
this shows you the code that would be displayed if you were using Apple’s Xcode Playground for Swift 3.
In other words, this shows you what the code does!
For example, let's have a match between two teams, LA Galaxy and Barcelona. First, we'll store their names in two separate values, teamOne for LA Galaxay, and teamTwo for Barcelona.
NOTE: To make long words easier to read, Swift uses camel case. So, instead of queensparkrangers, we would write queensParkRangers.
Also, don't think of the equals sign like in math, think of it more as assigning a value.
As the teams’ names won’t change, their values can be made constants (using the keyword let).
Also, as the team names contain letters, they go inside quotes, making them strings. By the way, strings are values which can hold almost any kind of character, such as letters:
iLoveSoccer
and