Skip to content

Instantly share code, notes, and snippets.

View stuckie's full-sized avatar
🛠️
Fighting Procrastination

Steven Campbell stuckie

🛠️
Fighting Procrastination
View GitHub Profile
@stuckie
stuckie / scsm.c
Last active October 19, 2015 21:32
Simple C State Machine
/*
Stuckie's Silly Little State Example .. let's call it SLate for a giggle.
Coded in C for the hell of it, and it's more interesting than in C++ which gives us the use of Classes and virtual functions.
*/
#include <stdio.h>
#include <stdlib.h>
/* Some globals for this little example. */
int gLoopCounter = 0;