All projects

Networking Laboratory · Università di Pisa

NYT Connections

A client–server take on the New York Times word-grouping game: one global timed game for everyone connected, scoring, leaderboards and asynchronous updates over UDP.

Jan 2026 – Mar 2026

30 cum laude

NYT Connections

Overview

Connections gives you sixteen words and four hidden themes, and the only way through is to see the link before you run out of attempts. Turning it into a networked game is where it gets interesting: everyone connected plays the same game, at the same time, on a timer the server owns.

The exam asked for a client–server system in Java. The server runs one global game, authenticates users, scores proposals, keeps the leaderboard and persists everything to disk; the client holds a TCP connection for requests and listens on UDP for the notification that the round has closed and a new one has started.

What I built

  • A multithreaded server: a TCP front end on an ExecutorService thread pool, a UDP server on its own dedicated thread, and a game scheduler that closes each round at timeout, scores it and opens the next one automatically.
  • A non-blocking TCP client built on Java NIO, speaking JSON: register, log in, submit a proposal, ask for game info, personal stats or the leaderboard.
  • Asynchronous push over UDP, so a player learns the round has ended without polling for it.
  • The scoring rules: +6, +12 or +18 points for one, two or three groups found, −4 for every wrong proposal, and a game lost after four mistakes.
  • File-based persistence of users and finished games, written atomically through temporary files so a crash mid-write cannot corrupt the store.

In pictures

The game this one answers to: the New York Times word-grouping puzzle.
The game this one answers to: the New York Times word-grouping puzzle.

Play a round

Real puzzles from the server's data file

Sixteen words, four hidden themes. Pick four that belong together and submit. Four wrong guesses and the game is over — the same rules the Java server enforces, scoring included.

Dealing the words…

The real thing runs on a server: one global game for everyone, a timer, a leaderboard and UDP notifications when the round closes. This is just the board.