Skip to content

Commit

Permalink
fizz buzz
Browse files Browse the repository at this point in the history
  • Loading branch information
zats committed Aug 16, 2015
1 parent 73c4ef8 commit 63b6eff
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions _posts/2015-08-15-fizz-buzz.md
@@ -0,0 +1,38 @@
---
layout: post
title: Fizz Buzz with GameplayKit
categories: []
tags: []
published: True

---

A great idea found at http://www.knowing.net/index.php/2015/08/04/fizzbuzz-with-ios-9-gameplaykit-expert-system-in-c-with-xam-ios and backported to swift.

[Fizz buzz](https://en.wikipedia.org/wiki/Fizz_buzz) is a simple game. GameplayKit makes it very easy to describe the rules. There is a vast place for improvement when working with state untyped dictionary. It can definitely use some swiftification. Here is the code:

{% gist zats/0ad1dac35e75587da7e0 fizzbuzz.swift %}

Output is

```
1
2
fizz
4
buzz
fizz
7
8
fizz
buzz
11
fizz
13
14
fizz buzz
16
...
```

I'm looking forward to seeing frameworks emerging on top of GameplayKit.

0 comments on commit 63b6eff

Please sign in to comment.