Guess and Go
A solo project built in Unity with C#, an endless-runner hybrid where a robot auto-walks through an infinite scrolling forest and stops to solve Wordle-style word puzzles at signs along the way. Playable in English or Swedish.
Built full Wordle-style guessing logic that correctly handles duplicate letters, paired with an on-screen QWERTY keyboard for input.
Built an infinite scrolling background with the robot auto-walking through it, stopping at signs to trigger puzzles along the way.
Implemented a scoring system scaled by number of tries, alongside a lives system, HUD, animations, and background music.
using System.Collections.Generic;
namespace RobotWordle
{
public enum LetterState
{
Empty,
Absent, // gray - letter not in word
Present, // yellow - letter in word, wrong spot
Correct // green - letter in word, right spot
}
public static class WordleLogic
{
public static LetterState[] Evaluate(string target, string guess)
{
target = target.ToUpperInvariant();
guess = guess.ToUpperInvariant();
int len = target.Length;
var result = new LetterState[len];
var remaining = new Dictionary<char, int>();
// Pass 1: exact matches (green). Track leftover letter counts for pass 2.
for (int i = 0; i < len; i++)
{
if (guess[i] == target[i])
{
result[i] = LetterState.Correct;
}
else
{
if (!remaining.ContainsKey(target[i])) remaining[target[i]] = 0;
remaining[target[i]]++;
}
}
// Pass 2: present (yellow) vs absent (gray), respecting remaining counts
for (int i = 0; i < len; i++)
{
if (result[i] == LetterState.Correct) continue;
char c = guess[i];
if (remaining.TryGetValue(c, out int count) && count > 0)
{
result[i] = LetterState.Present;
remaining[c] = count - 1;
}
else
{
result[i] = LetterState.Absent;
}
}
return result;
}
public static bool IsSolved(LetterState[] states)
{
foreach (var s in states)
if (s != LetterState.Correct) return false;
return true;
}
}
}