Project

Game of Life (Java)

Hard
586 completions
~ 27 hours
4.3

Practice using Swing library for creating GUI and get confident working with Random class and multithreading.

Provided by

JetBrains Academy JetBrains Academy

About

Get firsthand experience of creating a small inhabited universe and observe the many patterns in which this “life” can evolve. Generation by generation, watch the cells come and go, reacting to their environment, perishing from loneliness or finding comfort in company. In this project, you will write a simple “Game of Life”, a classic toy for programmers to entertain and educate themselves. Careful: might be hypnotizing!

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:
Using classes and arrays, enable the player to enter the number of generations and see what the outcome is.
Make your game truly entertaining by letting the player observe your universe live and evolve.
Practice using Swing and multithreading: create a nice interface for your game of life.
Almost done! Add some extra functions (pausing and unpausing, speed regulation) to make your game more engaging and various.

Reviews

eser avatar
eser
1 month ago
I've learned about Swing components and the Model-View-Controller design pattern. The project taught me how to implement the MVC specifically in Swing. Difficult, but instructive. Game of life itself is an intriguing mathematical construct, both to learn and to program.
Zane Stickel avatar
Zane Stickel
1 year ago
This was especially useful for understanding how to avoid locking the UI while running background (controller) tasks on a separate worker thread.
Albert Kloster avatar
Albert Kloster
3 years ago
I have learned MVC PatternJFrame with multiple JPanelsCombination of different LayoutsActionListener for Control Elements

4.3

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