GitXplorerGitXplorer
n

SwiftGolf

public
16 stars
17 forks
0 issues

Commits

List of commits on branch master.
Unverified
a72a831ad053b826c9856ccfb2e87ae74c5e4757

Add .gitignore

committed 10 years ago
Unverified
9f296f5ac887e7dfcac1dde63eb93f4734e0c7a8

hole 8 is a freebie

committed 10 years ago
Unverified
5a119105592647ffc5803d52b7c9619fd1b01fd8

Commented out additional tests

committed 10 years ago
Unverified
c6bc6025f26b07670782cedf268b85601210c270

Add placeholder values

committed 10 years ago
Unverified
0d43bc8f57a9c122cce12608956cc667f47a1d97

Add last specs

committed 10 years ago
Unverified
5ec95eac18e20f2243b293f39007d540b4fc3007

Remove Cent

committed 10 years ago

README

The README file for this repository.

Swift Golf

Requirements

  • Xcode 6 Beta 4
  • Basic knowledge of Swift

Setup

  • Fork https://github.com/nottombrown/SwiftGolf to your own github account.
  • Clone it to your local machine
  • Open it in Xcode and change the projectRepo variable in SwiftGolf/main.swift to the current directory
  • Make sure that the project builds (⌘+R)

How to play

Swift Golf is a game where the player is required to solve a number of problems (holes) in the fewest characters possible. The course consists of nine holes that you must implement. The holes are static methods that need to be written for the Golf class (SwiftGolf/Golf.swift). The requirements for these methods is specified by a set of tests for each hole (SwiftGolfTests/GolfTests.swift). To run the tests, simply press ⌘+U

The first time you run them, all tests will fail. Your goal is to get them all to pass.

Running the script will cause Xcode ⌘+R

  • The winning team must have completed all holes (with all tests passing).
  • If more than one team completes all holes, the winner is the team with fewest characters in the Golf class.
  • Teams will then be ranked by number of holes completed.

Rules

  • Whitespace isn't counted
  • No imports. Use only the swift standard libraries and Foundation.
  • Metaprogramming is allowed (for the Golf class only)
  • The only file you are allowed to modify is SwiftGolf/Golf.swift
  • No hard-coding return values!
  • If in doubt, ask.