Project
Simple Tic-Tac-Toe (Kotlin)
Easy
2321 completions
~ 12 hours
4.3After finishing this project, you'll get to know a lot about planning and developing a complex program from scratch, using methods, nested lists, list comprehension, handling errors, and processing user input.
Provided by
JetBrains Academy
About
Everybody remembers this paper-and-pencil game from childhood: Tic-Tac-Toe, also known as Noughts and crosses or Xs and Os. A single mistake usually costs you the game, but thankfully it is simple enough that most players discover the best strategy quickly. Let’s program Tic-Tac-Toe and get playing!
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:
To start things off, the program needs to be able to print any state of the field. You’ll write a serious multi-line program using a lot of prints.
Now it’s time to analyze user input and print the state of the field depending on it. You’ll learn to address specific positions in a string to achieve the required outcome.
Now we’re going to write a fully-functioning multi-line program that responds to the user’s actions and analyzes the state of the field. Not only will it tell you who is winning, but it will also determine if the situation on a given field is theoretically possible!
Tic-tac-toe is not all about analysis – a game is meant to be played! Write a program that can change the state of the field, as your first real step toward a fully-functioning game application!
Finally! Thanks to this app, you can always challenge a friend to play a quick game of Tic-Tac-Toe!
Reviews
ko
kayode oyedeji4 weeks ago
It helps solidify's my learning on the use of structural expressions and jumps
I really like Hyperskill as a whole. It’s well-designed, packed with deep knowledge, and each course has just the right length. I can learn at my own pace and code a lot to get comfortable with Kotlin. Honestly, it’s the best learning platform I’ve found. There’s no need to buy expensive books. Comp ...
abdin bashar
1 month ago
I have learned how to use Kotlin basics like variables, loops, and conditionals to build a complete game. It was fun to make the program interactive and handle user input correctly.
4.3
Learners who completed this project within the Kotlin Developer course rated it as follows: