Human Intelligence

This game was made with human intelligence. Mostly.

You can play it right now. It's interactive. Give it a try.

Guess the number between 1 and 100
Total Guesses: 0

It's kinda fun, isn't it? Maybe even a little addictive. I'll bet you played it more than once 😄

The back story

A few days ago I was telling my kids about ChatGPT. What can it do they asked? Can it make a game?

I don't know. Let's see.

Can you make a game in C#?

Sure, here's an example of a basic guessing game in C#:
using System;
class Program
static void Main()
Random random = new Random();
int secretNumber = random.Next(1, 101);
int guesses = 0;
Console.WriteLine("Welcome to the guessing game!");
Console.WriteLine("I'm thinking of a number between 1 and 100.");
while (true)
Console.Write("Enter your guess: ");
int guess = Convert.ToInt32(Console.ReadLine());
if (guess == secretNumber)
Console.WriteLine("Congratulations! You guessed the number in {0} guesses.", guesses);
else if (guess < secretNumber)
Console.WriteLine("Your guess is too low. Try again.");
Console.WriteLine("Your guess is too high. Try again.");

I pasted the code into Visual Studio and the game worked. They thought that was pretty neat.

But more importantly, it was a great way to get my kids coding. They really enjoyed messing around with it and making changes to the game. They changed the numbers and broke it. Then they fixed it. It reminded me of when I first discovered coding as a kid.

As impressive as it is that ChatGPT can write code in a few seconds, it was way more interesting to watch my kids get excited about coding. I don't know if AI will be doing most of the coding in the future, but I sure hope my kids can find joy in their careers, whatever that might be.

A few days later, I was thinking about what to write as a first article on my new website. Blog posts are boring. Wouldn't it be cool if I could create something interactive. That's when I had the idea to create the guessing game. I coded it up in in a couple of hours using Nuxt and the website was born.

I'll be doing more interactive articles in the future. If you liked this one follow me on Twitter 🐦