A
A
Alisa Zatorskaya2020-12-12 18:47:22
Game development
Alisa Zatorskaya, 2020-12-12 18:47:22

How to write a sapper in Python with levels?

How to write a Minesweeper game, with levels, and so that you can choose the size of the field? help me please

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
Sergey Karbivnichy, 2020-12-12
@hottabxp

1) Write a simple sapper;
2) Google:
a) Create Minesweeper Game with PyQt5
b) Create Minesweeper with Tkinter Module

M
Melkij, 2016-12-29
@melkij

If you do not specify how to compare table rows with each other, you will get a Cartesian product. Each line will join with each.
If you want to display all the data from both tables with marks, what is only in the first, what is only in the second, and what is in both - you need a full join with a join on this field.

select table1.items, table2.items from table1 full join table2 using(items)

D
Denis Smirnov, 2016-12-29
@darthunix

You make a cross join, getting all possible combinations (12x12=144). You need to do join by line numbers. I don’t have postgres handy, but something like this for memory

with t1_rows as (
  select row_number() over(), items from table1
),
t2_rows as (
  select row_number() over(), items from table2
)
select a.items, b.items from t1_rows a
full join t2_rows b using (row_number)

E
Eugene Wolf, 2016-12-29
@Wolfnsex

I want the result to be displayed, in which the first column is the values ​​of table1.items, the second column is the values ​​of table2.items, I do this:

Try like this:
Among other things, group by and everything else can be applied to the queries above. But, if you carefully read about the SQL standard, you will understand that the data can be displayed in a completely chaotic order (in the absence of an appropriate sorting) and that this query has a certain shade of insanity, since the data, although it is displayed as you said , but where they could be applied in this form, without the lack of comparisons (considering what I voiced above) - it’s quite difficult to come up with.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question