Skip to content

inspiringsource/ipro-wordle-public

Repository files navigation

ipro-Wordle

Academic Project: This repository represents my submission for the Individuelles Projekt (ipro) module at FHNW.

Status: Completed (Final academic submission – maintained for portfolio purposes)

Project Overview

This project implements a simplified Wordle-style game in Java as part of the Individuelles Softwareprojekt (ipro).

The main focus is on:

  • clear and correct game logic
  • input validation
  • incremental (playable) development
  • separation of logic and presentation

Advanced features such as multiplayer are intentionally out of scope.

Project Scope & Constraints

The project scope is intentionally limited to ensure reliability and clarity within a pass/fail evaluation context.

The goal is to demonstrate:

  • understanding of basic Java programming
  • incremental (playable) software development
  • clean and maintainable code
  • transition from a console application to a simple web application

The Report in English.
Der Bericht in Deutsch.

Methodology

We use an Incremental Delivery approach, illustrated by Henrik Kniberg’s Skateboard → Scooter → Bicycle → Motorcycle → Car metaphor.

Incremental Delivery Diagram

Image source and original post: Henrik Kniberg – Making sense of MVP

This project follows Henrik Kniberg’s interpretation of MVP, where the focus is on delivering the earliest usable version of the product, rather than incomplete technical components.

Instead of building unfinished fragments of a web application, the project starts in the first week with a fully playable console-based Wordle game (the “Skateboard”). This ensures real usability and enables meaningful feedback from the beginning.

Each subsequent increment (week) improves the product in terms of usability, interface, and delivery, while preserving a working, testable application at every stage, reducing risk and supporting continuous learning.

Development Timeline

Week 1 – Console Game (Completed)

The initial increment implements and validates the complete game logic as a console application.

Dictionary and Input

  • An initial minimal dictionary of example 5-letter words is used during early development:

    AARAU, BASEL, BRUGG, DATEI, MODUL, LOGIK
    
  • Later, a filtered German word list (5_letter_words.txt) is used for validation. This has been further refined to 5_letter_common_words.txt in week 5 to improve gameplay experience.

Game Logic Steps

  1. Define a dictionary containing valid 5-letter German words.
  2. Read user input.
  3. Validate input:
    • Exactly 5 characters.
    • Word must exist in the dictionary (5_letter_words.txt).
    • Word are selected from 5_letter_common_words.txt. These are more common words, which makes the game more enjoyable.
  4. Compare the input word with the target word.
  5. Generate feedback per character using the following scheme:
    • G: Correct letter in the correct position.
    • Y: Correct letter in the wrong position.
    • B: Letter not contained in the target word.
  6. Output feedback.
  7. Increase the attempt counter.
  8. End the game on success or after 6 attempts.

Core Variables

  • String[] WOERTERBUCH – list of valid words.
  • String erratenesWort – user input word.
  • int versuche – attempt counter.
  • String feedback – feedback string (G, Y, B).

Letter-by-Letter Comparison Logic

The feedback generation compares each letter of the guessed word to the target word, marking letters as:

  • G when the letter is correct and in the correct position.
  • Y when the letter exists in the target word but in a different position.
  • B when the letter does not appear in the target word.

This logic supports user understanding of the guess accuracy.

Random Word Selection

A random target word is selected from the dictionary:

String zufallsWort =
    WOERTERBUCH[(int)(Math.random() * WOERTERBUCH.length)];

Reference: https://stackoverflow.com/a/7923141

Diagram: Game Logic Draft

The following diagram illustrates the control flow of the console-based Wordle implementation, including input validation, feedback generation, and termination conditions.

Game Logic Draft

Week 2 – Web Foundation (Completed)

This increment reuses the existing console game logic in a simple web application using Javalin, HTML, CSS, and JavaScript.

Backend Setup

  • Java backend implemented with Javalin.

  • Maven project structure set up using archetype:

    mvn archetype:generate

    Creating:

    - pom.xml
    - src/main/java
    - src/test/java
    - groupId / artifactId
  • Basic server setup confirmed with a "Hello World" example.

Frontend Implementation

  • Basic frontend built with HTML, CSS, and JavaScript.
  • Provides input elements and styling.
  • Communicates with the Java backend via simple GET and POST requests using Javalin.

Functional Description

Week 2 delivers a functional but minimal web "scooter" — connected, playable, but intentionally simple.

Initial web app screenshots:

Web App Hello world

After integrating frontend (HTML, CSS and JavaScript):

Web App Progress week 2

For more technical details see wiki:
Frontend & Backend Technology Overview

Week 3 – Full Web Gameplay (Completed)

This increment aims to extend the web application with full gameplay features.

Planned Features

This week features included:

  • Improvement of Randomly select a German word from 5_letter_words.txt as WOERTERBUCH word.
  • JavaScript modal popup for win/lose messages and menu:
    • Reset game functionality.
    • Lose condition (after 6 attempts).
    • Win condition (all letters correct).
  • Other improvements including CSS styling and js effects prep for week 4.
  • Basic unit tests for core game logic using JUnit.

Win game week 3

Inspired by w3schools.com/

Week 4: UX Improvements & Interaction & Testing (Completed)

Refinements

  • Reveal target word button and reveal word on game over (requested feature).
  • Deployment brought earlier to week 4.
  • Enhanced user interface and interaction (e.g. add modal popups for not valid words).
  • Advanced unit tests for core game logic using JUnit.
  • Upgraded the word list to a more common set of 5-letter German words (5_letter_common_words.txt), improving gameplay experience (words make more sense in everyday usage).
  • Added a virtual keyboard to the frontend using the simple-keyboard library.
  • Improved feedback to handle duplicate letters correctly.

Week 5: Polishing & Presentation (Car 🚗) #5 (Completed)

Final Steps

  • Improve usability and overall user experience
  • Clean up code and documentation (add comments)
  • Deployment on Render with GitHub integration for CD.
  • Added toggle button to switch between auto sending and manual sending of the word.
  • Last testing and bug fixing.
  • Clone to GitLab
  • Presentation

Web App Final Version

Everything is working and deployed 😌

Game Rules & Feedback System

The Wordle game uses the following symbols to provide feedback on user guesses:

Symbol Meaning
G Correct letter in correct position
Y Correct letter in wrong position
B Letter not contained in the target word

This feedback guides players towards the correct word within 6 attempts.

Game Logic Overview

The Wordle game logic consists of:

  • Selecting a random target word from the dictionary.
  • Reading and validating user input.
  • Comparing the guess to the target word.
  • Generating per-letter feedback (G, Y, B).
  • Tracking the number of attempts.
  • Ending the game on success or after 6 attempts.

This logic is implemented in Java and designed to be reused across console and web interfaces.

Data & Dictionary Handling

The list of valid German words is based on:

Processing steps:

  • Filter words with exactly 5 letters.
  • Convert all words to uppercase.
  • Store the result in 5_letter_words.txt.

Rationale:

  • Simple uppercase comparison avoids locale or regex complexity at runtime.
  • Ensures consistent validation and feedback generation.

Edit (Week 4): The word list was later refined to 5_letter_common_words.txt to include more commonly used words.

Project Structure

The project is organized to support incremental development and clear separation of concerns.

.
├── Dockerfile
├── Presentation
│   └── ipro25HS-Presentation.pdf
├── README.md
├── data
│   ├── 1000-most-common-german-words.txt
│   ├── German-words-1600000-words-multilines.json
│   ├── Helper.class
│   ├── Helper.java
│   ├── README-Helper.md
│   └── words_v1
├── dependency-reduced-pom.xml
├── docs
│   └── methodology.md
├── ipro-Merkblatt_Studierende.pdf
├── ipro-Wordle.pdf
├── myImages
│   ├── Javalin_HelloWorld.png
│   ├── backend_revision.JPG
│   ├── basicFrontend.png
│   ├── basicFrontend02.png
│   ├── logic_draft.jpg
│   ├── mvp.png
│   ├── restart_logic.JPG
│   ├── web_app_logic.jpg
│   └── win_game.png
├── pom.xml
├── src
│   ├── main
│   │   ├── java
│   │   │   └── app
│   │   │       ├── Dictionary.java
│   │   │       ├── Main.java
│   │   │       └── WebApp.java
│   │   └── resources
│   │       ├── data
│   │       │   ├── 5_letter_common_words.txt
│   │       │   ├── 5_letter_words.txt
│   │       │   └── 5_letter_wordsv2.txt
│   │       └── public
│   │           ├── css
│   │           │   ├── styles.css
│   │           │   └── styles.scss
│   │           ├── index.html
│   │           └── js
│   │               └── app.js
│   └── test
│       └── java
│           └── app
│               └── MainTest.java
└── target
    ├── classes
    │   ├── app
    │   │   ├── Dictionary.class
    │   │   ├── Main.class
    │   │   └── WebApp.class
    │   ├── data
    │   │   ├── 5_letter_common_words.txt
    │   │   ├── 5_letter_words.txt
    │   │   └── 5_letter_wordsv2.txt
    │   └── public
    │       ├── css
    │       │   ├── styles.css
    │       │   └── styles.scss
    │       ├── index.html
    │       └── js
    │           └── app.js
    ├── generated-sources
    │   └── annotations
    ├── generated-test-sources
    │   └── test-annotations
    ├── maven-archiver
    │   └── pom.properties
    ├── maven-status
    │   └── maven-compiler-plugin
    │       ├── compile
    │       │   └── default-compile
    │       │       ├── createdFiles.lst
    │       │       └── inputFiles.lst
    │       └── testCompile
    │           └── default-testCompile
    │               ├── createdFiles.lst
    │               └── inputFiles.lst
    ├── original-wordle-1.0-SNAPSHOT.jar
    ├── surefire-reports
    │   ├── TEST-app.MainTest.xml
    │   └── app.MainTest.txt
    ├── test-classes
    │   └── app
    │       └── MainTest.class
    └── wordle-1.0-SNAPSHOT.jar

Advantages:

  • Clear separation between game logic and web server code.
  • Supports reuse across interfaces.
  • Facilitates maintainability.

Deployment & Execution

To set up the project using Maven Archetype, run:

mvn archetype:generate

To build and run the web application:

mvn clean package && java -jar target/wordle-1.0-SNAPSHOT.jar

or using Maven Exec plugin with:

mvn clean package exec:java

Access the web app in a browser at:

http://localhost:7070

References & Credits

Credits & Acknowledgements

  • Marco Benedetti — feedback, discussions, and practical support during development.
  • ChatGPT (OpenAI) — supportive tool for explanations, wording improvements, and structuring documentation.
  • Henrik Kniberg — MVP metaphor inspiration.
  • Stack Overflow and other technical resources cited within the document.

Nachname Vorname Projektname Betreuung
B. Avi Wordle A. A.

All rights reserved - Copyright © 2026 Avi B & FHNW

About

Wordle in Java – Individuelles Softwareprojekt (FHNW ipro25HS)

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors