Skip to content

Instantly share code, notes, and snippets.

@janellbaxter
janellbaxter / PiF-Adventure-9.5-Framework-Progress.cs
Last active December 1, 2021 13:39
9.5 Framework Progress; Programming is Fun: C# Adventure Game (Learn C#)
/*
* [Your Title]
* by Your Name, Date
*
* This work is a derivative of
* "C# Adventure Game" by http://programmingisfun.com, used under CC BY.
* https://creativecommons.org/licenses/by/4.0/
*/
using System;
@janellbaxter
janellbaxter / PiF-Adventure-9.4-For-Each.cs
Last active February 22, 2017 19:01
9.4 For Each; Programming is Fun: C# Adventure Game (Learn C#)
/*
* [Your Title]
* by Your Name, Date
*
* This work is a derivative of
* "C# Adventure Game" by http://programmingisfun.com, used under CC BY.
* https://creativecommons.org/licenses/by/4.0/
*/
using System;
@janellbaxter
janellbaxter / PiF-Adventure-9.3-For-Loops.cs
Created February 20, 2017 19:48
9.3 For Loops; Programming is Fun: C# Adventure Game (Learn C#)
using System;
namespace Lunch
{
class Program
{
static void Main()
{
string[] lunch = new string[3];
lunch[0] = "sandwich";
@janellbaxter
janellbaxter / PiF-Adventure-9.2-For-Loops.cs
Created February 20, 2017 19:46
9.2 For Loops; Programming is Fun: C# Adventure Game (Learn C#)
using System;
namespace Lunch
{
class Program
{
static void Main()
{
string[] lunch = new string[3];
lunch[0] = "sandwich";
@janellbaxter
janellbaxter / PiF-Adventure-9.1-For-Loops.cs
Created February 20, 2017 19:42
9.1 For Loops; Programming is Fun: C# Adventure Game (Learn C#)
using System;
namespace Count
{
class Program
{
static void Main()
{
Console.Title = "Examples of for loops";
@janellbaxter
janellbaxter / PiF-Adventure-8.1-Branching-Framework.cs
Last active October 25, 2017 16:39
8.1 Branching Framework; Programming is Fun: C# Adventure Game (Learn C#)
/*
* 8.1 Branching Framework
* Example code from Programming is Fun: C# Adventure Game
* Learn C# (for beginners)
* http://programmingisfun.com/learn/c-sharp-adventure-game
*/
using System;
namespace Adventure
@janellbaxter
janellbaxter / PiF-Adventure-7.2-Logical-Operators.cs
Created February 20, 2017 00:08
7.2 Logical Operators; Programming is Fun: C# Adventure Game (Learn C#)
/*
* 7.2 Logical Operators
* Example code from Programming is Fun: C# Adventure Game
* Learn C# (for beginners)
* http://programmingisfun.com/learn/c-sharp-adventure-game
*/
using System;
namespace LogicalOperators
{
@janellbaxter
janellbaxter / PiF-Adventure-7.1-Conditional-Statements.cs
Last active February 20, 2017 00:07
7.1 Conditional Statements; Programming is Fun: C# Adventure Game (Learn C#)
/*
* 7.1 Conditional Statements
* Example code from Programming is Fun: C# Adventure Game
* Learn C# (for beginners)
* http://programmingisfun.com/learn/c-sharp-adventure-game
*/
using System;
namespace ConditionalStatements
{
@janellbaxter
janellbaxter / PiF-Adventure-6.5-Return-Values.cs
Last active February 19, 2017 23:28
6.5 Return Values; Programming is Fun: C# Adventure Game (Learn C#)
/*
* 6.5 Return Values
* Example code from Programming is Fun: C# Adventure Game
* Learn C# (for beginners)
* http://programmingisfun.com/learn/c-sharp-adventure-game
*/
using System;
namespace ReturnValues
@janellbaxter
janellbaxter / PiF-Adventure-6.4-Overloaded-Method.cs
Created February 19, 2017 23:13
6.4 Overloaded Method; Programming is Fun: C# Adventure Game (Learn C#)
/*
* 6.4 Overloaded Method
* Example code from Programming is Fun: C# Adventure Game
* Learn C# (for beginners)
* http://programmingisfun.com/learn/c-sharp-adventure-game
*/
using System;
namespace Dialog