Project

Desktop Connect Four

Hard
280 completions
~ 31 hours
4.3

Learn about multidimensional arrays, a variety of loops, and how to utilize Java Swing library to create a user interface. Write a complicated algorithm to check the game board for a winning condition after each turn and highlight the winning move.

Provided by

JetBrains Academy JetBrains Academy

About

Tired of playing Tic-Tac-Toe? Want something a little more challenging? Connect Four is a great game that fuses the complexity of a larger game board and the need to line up more pieces. In this project, you will create a version of the game with a graphical user interface that you can run on your computer. You will practice concepts frequently tested in technical interviews at top tech companies.

Training project icon

Training project

This project allows you to practice and strengthen your coding skills, helping you get ready for more advanced tasks ahead.

What you'll learn

Once you choose a project, we'll provide you with a study plan that includes all the necessary topics from your course to get it built. Here’s what awaits you:
Create a game board divided into cells using Java Swing library.
Enable the cells on the board to accept user input and place the appropriate piece based on a player's turn.
Make the cells in a column respond as a unit to fill the board from the bottom row.
Add an algorithm to check for a winner after every click and then highlight the winning cells.

Reviews

User 146657103
4 weeks ago
I have learned about Direction vectors and symmetry{dr, dc} and its negation {-dr, -dc} let me check a full line (8 directions) using only 4 stored vectors — a small but reusable pattern anytime I'm walking outward from a center point in a grid (flood fill, line-of-sight, this kind of adjacency che ...
Jakub Wilk avatar
Jakub Wilk
6 months ago
It is simple and interesting project where we can practice java swing basics and create first GUI.
Mang Sui Sin avatar
Mang Sui Sin
9 months ago
i have learned what UX/UI and GUI is and how to wrk in destop game.

4.3

Learners who completed this project within the Java Desktop Application Developer course rated it as follows:
Usefulness
4.4
Fun
4.4
Clarity
4.2