L
L
lis_foxy2021-02-03 15:18:08
Programming
lis_foxy, 2021-02-03 15:18:08

How to write a guessing program?

I want to make a program where there will be 5 squares, and behind them different pictures are hidden and, like, the user must guess behind which square the picture he needs will be. Accordingly, after one attempt, the remaining cells open and guess everything again)
How to write this? where to begin? I'm generally a beginner, in what program would it be easier to do this?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
V
Vasily Bannikov, 2021-02-03
@vabka

How to write this? where to begin?

1. It is necessary to formulate more precise requirements.
For example: The game is graphical and should run on a web page
2. Explore what technologies are suitable for this.
For example: To solve a similar problem, you can use:
- Unity and run the game in a web player
- Javascript and draw the game in canvas
- Some other game engine that can work on the web.
3. We choose the most relevant and interesting technology, since we are learning.
- Unity is very big. You will have to learn not only units, but also C #, OOP and who knows what. At the same time, games on the unity on the web run for a long time.
- Some other engine takes care of all the minuses of the unit + will probably be a less promising waste of time.
- Javascript looks perfect here - you don't even have to learn css, html and layout to solve this problem.
4. Consistently study the chosen technology. For Javascript, a good place to start is MDN.
Let me remind you that I chose JS solely from the requirements. For example, you can change the requirements and leave "it doesn't matter what the game looks like and where it starts. You need to learn programming as soon as possible and make it" - then take Scratch

H
HemulGM, 2021-02-03
@HemulGM

Install Delphi. You create a new project. From the list of components, you throw 5 image components into the window.
Arrange as you like. You select an image and on the left in the properties editor you create an event that occurs when you click on the image.
Next, simple pascal.
Even from scratch, you can do it in 2 hours. And if you knew what and how, then in 10 minutes.

S
Sergey Sokolov, 2021-02-03
@sergiks

Easier, for example, directly in the browser.
You will need to understand the basics of HTML and JavaScript .
Start by drawing the interface: 5 squares.
Then add minimal interaction: click on the square to show the picture in it.
To ask further questions here, it is more convenient to do all the work online in the jsFiddle editor

D
Dmitry, 2021-02-03
@i__dmitry

How to write this? where to begin?

1. Learn the basics of programming and the basics of Computer Science;
2. Learn the basics of any popular language (Python, Ruby, Javascript, PHP, Java, C#);
3. Start to realize your idea, while immersing yourself in the language being studied.
The basics I write about are available as numerous tutorials, videos, courses, articles, and more. Without all this, there is no point in discussing the described problem at all.

V
Vadya369, 2021-03-07
@Vadya369

If with graphics, then everything above. If with the console (a black window like a command line), then using the standard tools of almost any language.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question