M
M
Maxim K2022-02-18 22:40:27
C++ / C#
Maxim K, 2022-02-18 22:40:27

What is the best way to fix code in C# - sokoban?

Hello. What is the best way to fix the code? https://github.com/maksmkv/Sokoban . More interested in the code sections of the check that the stone hit the target:

if (map[x, y-1] == 'p')
                {
                    map[x, y] = 'g';
                    g.DrawImage(image6, x * 32, (y-1) * 32);
                    positionBall = positionBall + 1;
                    return true;
                }


If it's not difficult, tell me how to add a check if the stone was on the target, but then suddenly it was moved so that everything did not disappear. Few people did. THANK YOU

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question