Skip to content

Commit

Permalink
add examples
Browse files Browse the repository at this point in the history
  • Loading branch information
zehengl committed Aug 20, 2024
1 parent 348196d commit ed77007
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/minesweeper.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
n, m, k = [int(d) for d in input().split()]
b = []
for _ in range(n):
b.append(list("." * m))
for _ in range(k):
i, j = [int(d) - 1 for d in input().split()]
b[i][j] = "*"
print("\n".join("".join(r) for r in b))
7 changes: 7 additions & 0 deletions src/skak.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
xh, yh = io.read("*n", "*n")
xp, yp = io.read("*n", "*n")
if xh == xp or yh == yp then
print(1)
else
print(2)
end

0 comments on commit ed77007

Please sign in to comment.